comparison code/dotScanner.lm @ 32:934d03d42a7e

Debug junk removed
author Michael Pavone <pavone@retrodev.com>
date Sat, 26 Jul 2014 01:02:41 -0700
parents 3812bf35168d
children 968705fcb4c6
comparison
equal deleted inserted replaced
31:3812bf35168d 32:934d03d42a7e
205 while: { notdone } do: { 205 while: { notdone } do: {
206 if: (continuations isInteger?) { 206 if: (continuations isInteger?) {
207 notdone <- 0 207 notdone <- 0
208 } else: { 208 } else: {
209 continuations <- fold: continuations [] with: :acc el{ 209 continuations <- fold: continuations [] with: :acc el{
210 print: #[20 acc]
211 ret <- acc 210 ret <- acc
212 if: notdone { 211 if: notdone {
213 ret <- el: 212 ret <- el:
214 print: #[11 ret]
215 if: (ret isInteger?) { 213 if: (ret isInteger?) {
216 ret <- acc 214 ret <- acc
217 } else: { 215 } else: {
218 if: (ret value) { 216 if: (ret value) {
219 print: 12
220 notdone <- 0 217 notdone <- 0
221 ret <- (ret tail) 218 ret <- (ret tail)
222 } else: { 219 } else: {
223 print: 13
224 ret <- (ret tail) | acc 220 ret <- (ret tail) | acc
225 } 221 }
226 } 222 }
227 } else: {} 223 } else: {}
228 print: #[21 ret]
229 ret 224 ret
230 } 225 }
231 print: #[15 continuations]
232 if: notdone { 226 if: notdone {
233 continuations <- flatten: continuations 227 continuations <- flatten: continuations
234 } else: {} 228 } else: {}
235 print: #[16 continuations]
236 } 229 }
237 } 230 }
238 continuations 231 continuations
239 } 232 }
240 233
280 } else: {} 273 } else: {}
281 } 274 }
282 } 275 }
283 } else: { 276 } else: {
284 } 277 }
285 print: #[10 myLoc ret]
286 ret 278 ret
287 } 279 }
288 } 280 }
289 281
290 step <- :myState world { 282 step <- :myState world {
293 myLoc <- (lmState tail) value 285 myLoc <- (lmState tail) value
294 286
295 visited <- treeMap: grid :row { 287 visited <- treeMap: grid :row {
296 treeMap: row :el { 0 } 288 treeMap: row :el { 0 }
297 } 289 }
298 print: #[5 myLoc]
299 path <- advancer: [(makeContClos: grid myLoc [])] 290 path <- advancer: [(makeContClos: grid myLoc [])]
300 print: path
301 #[0 (path value)] 291 #[0 (path value)]
302 } 292 }
303 293
304 main <- :initWorld ghostCode { 294 main <- :initWorld ghostCode {
305 /* 295 /*