Skip to content

Instantly share code, notes, and snippets.

@aka-mj
Last active November 22, 2019 18:43
Show Gist options
  • Save aka-mj/386b1c04850e4a01ad4d1403b5f1afc3 to your computer and use it in GitHub Desktop.
Save aka-mj/386b1c04850e4a01ad4d1403b5f1afc3 to your computer and use it in GitHub Desktop.
Reverse a list in F#
let reverse lst' =
let rec rev acc = function
| [] -> acc
| head::tail -> rev (head::acc) tail
rev [] lst'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment