Created
March 26, 2019 11:27
-
-
Save alieniasty/738007a986bccb36d2c627e24362c62d to your computer and use it in GitHub Desktop.
*Given [2] to h::t. Head is 2, tail i empty list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let revR list = | |
let rec shift acc tail = | |
match tail with | |
| [] -> acc | |
| h::t -> shift ([h] @ acc) t | |
shift [] list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment