Skip to content

Instantly share code, notes, and snippets.

@theimowski
Last active March 23, 2017 15:17
Show Gist options
  • Save theimowski/f20e81c14a7e22d6d92153b0ddc3fa7b to your computer and use it in GitHub Desktop.
Save theimowski/f20e81c14a7e22d6d92153b0ddc3fa7b to your computer and use it in GitHub Desktop.
// yield syntax
[ for _ in [1..5] do
yield "A" ]
// `->` syntax - shortcut for do .. yield
[ for _ in [1..5] -> "A" ]
// sequence instead of list
seq {
for _ in [1..5] -> "A"
}
// using List.map
[1 .. 5]
|> List.map (fun _ -> "A")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment