Skip to content

Instantly share code, notes, and snippets.

View nschmoller's full-sized avatar

Niek Schmoller nschmoller

View GitHub Profile
@nschmoller
nschmoller / gol.hs
Created December 3, 2011 15:34
Game of life in Haskell (in 45 minutes)
zeroes 0 = []
zeroes n = [0] ++ (zeroes (n-1))
foo x y z= zipWith (+) (zipWith (+) x y) z
grid_neighbours l =
let top = map inc_neighbours ( [(zeroes (length (head l)))] ++ (take (length l) l) )
bottom = map inc_neighbours ((drop 1 l) ++ [(zeroes (length (head l)))])
current = map neighbours l
in zipWith3 foo top bottom current
@nschmoller
nschmoller / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am nschmoller on github.
  • I am nschmoller (https://keybase.io/nschmoller) on keybase.
  • I have a public key ASC-c9G6wifSpMLu4jd53CaoJ8SANhSHutusGDpzpk03ygo

To claim this, I am signing this object: