Created
April 26, 2015 14:04
-
-
Save SteveGilham/eff2610b17077bafd38b to your computer and use it in GitHub Desktop.
List of monads to monad of lists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rec Sequence l | |
= match l with | |
| [] -> Return [] | |
| h::t -> h >>= fun h1 -> (Sequence t) >>= fun t1 -> Return (h1::t1);; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment