Skip to content

Instantly share code, notes, and snippets.

@diegopacheco
Created March 6, 2012 04:56
Show Gist options
  • Select an option

  • Save diegopacheco/1983682 to your computer and use it in GitHub Desktop.

Select an option

Save diegopacheco/1983682 to your computer and use it in GitHub Desktop.
Haskell List Compreenshions
take 10 [ (i,j) | i <- [1,2], j <- [1..]] -- [(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8),(1,9),(1,10)]
[x*2 | x <- [1..10]] -- [2,4,6,8,10,12,14,16,18,20]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment