Skip to content

Instantly share code, notes, and snippets.

@ericlippert
ericlippert / Life1978v1.cs
Created Feb 17, 2021
1978 BASIC Life line-by-line ported to C#
View Life1978v1.cs
// This is a line-for-line C# port of a 1978 BASIC implementation of Conway's Life;
// bugs are included as they were in the original program.
// See https://ericlippert.com/2021/02/17/life-part-38/ and
// https://ericlippert.com/2021/02/23/life-part-39/ for details.
using System;
using static System.Math;
public class Program
{
@ericlippert
ericlippert / Combinations.cs
Last active Nov 29, 2020
Computing combinations of a sequence in C#
View Combinations.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
// An immutable stack
//
// Note that the class is abstract with a private
// constructor; this ensures that only nested classes
// may be derived classes.