Last active
December 26, 2015 09:39
-
-
Save masaru-b-cl/7131490 to your computer and use it in GitHub Desktop.
[1,2,3] から{0 => 1, 1 => 2, 3 => 2} を作りたい in F#
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
| // 「F# Interactive」での実行結果 | |
| > [1; 2; 3] | |
| - |> Seq.mapi (fun i x -> (i, x)) | |
| - |> Map.ofSeq | |
| - ;; | |
| val it : Map<int,int> = map [(0, 1); (1, 2); (2, 3)] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment