Skip to content

Instantly share code, notes, and snippets.

@FoleyAxel
Created January 19, 2019 22:56
Show Gist options
  • Select an option

  • Save FoleyAxel/68cee10a870e4cb387e60d1e1d014a23 to your computer and use it in GitHub Desktop.

Select an option

Save FoleyAxel/68cee10a870e4cb387e60d1e1d014a23 to your computer and use it in GitHub Desktop.
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