Skip to content

Instantly share code, notes, and snippets.

@Wilfred

Wilfred/zip.ml Secret

Created November 12, 2018 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wilfred/a224ed25d398babbb17653561a51dbbe to your computer and use it in GitHub Desktop.
Save Wilfred/a224ed25d398babbb17653561a51dbbe to your computer and use it in GitHub Desktop.
let rec zip = function
| [] [] -> []
| (x::xs) (y::ys) -> (x, y) :: zip xs ys
| _ _ -> failwith "lists of different lengths"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment