aUCBLogo Demos and Tests / foreachtest


to foreachtest
   
textScreen   clearText
   
l=Int [[[1 2][3 4][5 6]] [[7 8][9 10]]]
   
foreach l [show ?*?]
   
ret=[]
   
foreach l [show filter [List? ?] ?]
   
;the foreach primitive is not yet complete!
;   foreach l "show
;   foreach l [[x] show x]
;   foreach l [[x][show x]]
;   t l
end

to t l
   
foreach l
   
[   (show ? ?rest)
      
if List? ? [t ?]
   
]
end