Created
February 17, 2017 17:42
-
-
Save zakaluka/3b2be94503074b911945c7c26cf2cd53 to your computer and use it in GitHub Desktop.
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 moveAll strList = | |
Regex.Matches (strList, @"[LR]\d+") | |
|> Seq.cast | |
|> Seq.fold | |
(fun oldloc (instr : System.Text.RegularExpressions.Match) -> | |
move | |
(instr.Value.[0] |> toTurn) | |
(instr.Value.Substring 1 |> int) | |
oldloc | |
) | |
startLoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment