# HG changeset patch # User William Morgan # Date 1406359138 25200 # Node ID 5d1ac440b9db5432fe000fd5d1756c53f4841005 # Parent 75c97fb8060263314fc77e7dfb4c2d202734ab44 Seems to be working in CPU simulator. Need to remove debug crap diff -r 75c97fb80602 -r 5d1ac440b9db code/dotScanner.lm --- a/code/dotScanner.lm Sat Jul 26 00:03:41 2014 -0700 +++ b/code/dotScanner.lm Sat Jul 26 00:18:58 2014 -0700 @@ -208,23 +208,31 @@ if: (continuations isInteger?) { notdone <- 0 } else: { - print: 6 - continuations <- flatten: (fold: continuations [] with: :acc el{ + print: #[6 continuations] + continuations <- fold: continuations [] with: :acc el{ print: 7 ret <- acc if: notdone { + print: 25 ret <- el: if: (ret isInteger?) { } else: { + print: #[26 ret] if: (ret value) { + print: 27 notdone <- 0 ret <- (ret tail) } else: { + print: 28 ret <- (ret tail) | acc } } } else: {} - }) + ret + } + if: notdone { + continuations <- flatten: continuations + } else: {} } } continuations @@ -272,8 +280,10 @@ move <- 0 while: { move < 4 } do: { ret <- (makeContClos: grid (calcPos: move myLoc) move | path) | ret + move <- move + 1 } ret <- #[0 ret] + print: 21 } else: {} } } @@ -302,7 +312,18 @@ #[0 (path value)] } - main <- :initWorld mystery { + main <- { + print: (step: 0 #[ + [ + [0 0 0 0] + [0 2 2 0] + [0 1 0 0] + [0 0 0 0] + ] + #[0 #[1 2] 2 3 0] + [] + 0 + ]) #[0 step] } }