Skip to content

Instantly share code, notes, and snippets.

@adilakhter
Last active Dec 10, 2015
Embed
What would you like to do?
let rec zipTwo (x:int list) (y: int list) : ((int*int) list) option =
match x,y with
| ([], []) -> Some []
| (xhd::xtl, yhd::ytl) ->
match zipTwo xtl ytl with
| None -> None
| Some lst -> Some ((xhd,yhd)::lst)
| (_,_) -> None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment