Created
June 19, 2017 08:33
-
-
Save Shibe/438ca786d62274081a806fbb0df78555 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
let rec zip list1 list2 = | |
match list1, list2 with | |
| [], [] -> [] | |
| head1 :: tail1, head2 :: tail2 -> (head1, head2) :: zip tail1 tail2 | |
| _ -> failwith "Incorrect input" | |
[<EntryPoint>] | |
let main argv = | |
printfn "%A" (zip [1;2;3] [4;5;6]) | |
0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment