Created
December 15, 2014 17:31
-
-
Save bjartwolf/fd7098247f2289b7a317 to your computer and use it in GitHub Desktop.
antshort
This file contains hidden or 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
module ant | |
[<EntryPoint>] | |
let main argv = | |
List.fold(fun((x,y),d,b)_-> let a=[|0;1;0;-1;0|] in let p=x+a.[d+1],y+a.[d] in p,(d+if b-set[p]=b then 3 else 1)%4,(b-set[p])+(set[p]-b))((100,100),0,set[])[0..15000] |> printfn "%A" | |
System.Console.ReadLine() |> ignore | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment