Created
January 19, 2019 22:56
-
-
Save FoleyAxel/68cee10a870e4cb387e60d1e1d014a23 to your computer and use it in GitHub Desktop.
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
| open System | |
| type Example = | |
| { | |
| Name: string | |
| EventReceiver: IEvent<string> option | |
| } | |
| let rec loop examples = | |
| examples | |
| |> Seq.map (fun example -> | |
| match example.EventReceiver with | |
| | None -> | |
| let ievent = functionThatReturnIeventFromStream | |
| ievent.Add (fun x -> printfn "%A" x) | |
| { example with EventReceiver = Some ievent } | |
| | Some -> example | |
| ) | |
| |> loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment