Skip to content

Instantly share code, notes, and snippets.

@jb55
Created May 27, 2011 23:45
Show Gist options
  • Select an option

  • Save jb55/996412 to your computer and use it in GitHub Desktop.

Select an option

Save jb55/996412 to your computer and use it in GitHub Desktop.
derp = do
x <- [1,2,3]
y <- [x, x + 1, x + 2]
return y
derp2 :: [Int]
derp2 = concatMap (\x -> [x, x + 1, x + 2]) [1,2,3]
-- derp == derp2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment