let rec map f xs = memo( match xs with
| Nil → r
| Cons(x, nm, xs) →
let nm1, nm2 = fork nm in
Cons(f x, nm1, ref (nm2, map f (!xs))) )
Created
February 2, 2017 20:20
-
-
Save nikomatsakis/ca3691af03ead3e4151a51e59d14ff67 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment