https://github.com/jrincayc/ucblogo-code
Revision 396c8f2fa6077e7c4b8b55683916aca734da6daa authored by Joshua J. Cogliati on 28 November 2019, 22:54:47 UTC, committed by Joshua J. Cogliati on 29 November 2019, 01:56:21 UTC
1 parent 2cdc440
Tip revision: 396c8f2fa6077e7c4b8b55683916aca734da6daa authored by Joshua J. Cogliati on 28 November 2019, 22:54:47 UTC
Removing old wxWidgets 2.6 ifdefs and idndefing Blit that doesn't work in mac
Removing old wxWidgets 2.6 ifdefs and idndefing Blit that doesn't work in mac
Tip revision: 396c8f2
foreach
;;; -*- logo -*-
.macro foreach [:foreach.inputs] 2
catch "foreach.catchtag ~
[op foreach.done runresult ~
[foreach1 bl :foreach.inputs last :foreach.inputs 1]]
op []
end
to foreach1 :template.lists :foreach.template :template.number
if emptyp first :template.lists [throw "foreach.catchtag]
apply :foreach.template firsts :template.lists
.maybeoutput foreach1 bfs :template.lists :foreach.template :template.number+1
end
to foreach.done :foreach.result
if emptyp :foreach.result [op [stop]]
op (list "output "first (list first :foreach.result))
end
to ?rest [:which 1]
output bf item :which :template.lists
end
bury [foreach foreach1 foreach.done ?rest]
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...