Skip to content

Instantly share code, notes, and snippets.

@siddhartha-gadgil
Created March 18, 2014 14:12
Show Gist options
  • Select an option

  • Save siddhartha-gadgil/9620864 to your computer and use it in GitHub Desktop.

Select an option

Save siddhartha-gadgil/9620864 to your computer and use it in GitHub Desktop.
_flatMap_ : {A B : Set} → List A → (A → List B) → List B
[] flatMap _ = []
(a :: xs) flatMap f = (f a) ++ (xs flatMap f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment