Skip to content

Instantly share code, notes, and snippets.

@jbrestan
Created May 2, 2015 08:37
Show Gist options
  • Save jbrestan/fbce490f33f820fcad55 to your computer and use it in GitHub Desktop.
Save jbrestan/fbce490f33f820fcad55 to your computer and use it in GitHub Desktop.
(Ineffective) zip using fold
let zip xs ys =
let step acc x =
match acc with
| (rs, y::ys) -> ((x,y)::rs, ys)
| _ -> acc
Seq.fold step ([], ys) xs
|> fst
|> List.rev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment