Last active
March 23, 2017 15:17
-
-
Save theimowski/f20e81c14a7e22d6d92153b0ddc3fa7b to your computer and use it in GitHub Desktop.
This file contains 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
// 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