Skip to content

Instantly share code, notes, and snippets.

@elight
Created August 3, 2013 20:30
Show Gist options
  • Save elight/6147870 to your computer and use it in GitHub Desktop.
Save elight/6147870 to your computer and use it in GitHub Desktop.
neighbor_coords(X, Y) ->
[ { NX, NY } ||
NX <- [ X - 1, X, X + 1 ],
NY <- [ Y - 1, Y, Y + 1 ],
{ NX, NY } /= { X, Y } ].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment