Skip to content

Instantly share code, notes, and snippets.

@kunishi
Created January 29, 2014 10:18
Show Gist options
  • Select an option

  • Save kunishi/8685140 to your computer and use it in GitHub Desktop.

Select an option

Save kunishi/8685140 to your computer and use it in GitHub Desktop.
fun rev1(nil, M) = M
| rev1(x::xs, ys) = rev1(xs, x::ys);
fun reverse(L) = rev1(L, nil);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment