7 lines
338 B
Text
7 lines
338 B
Text
100[$][0 1ø:1-]# {initialize doors}
|
|
%
|
|
[s;[$101\>][$$;~\:s;+]#%]d: {function d, switch door state function}
|
|
1s:[s;101\>][d;!s;1+s:]# {increment step width from 1 to 100, execute function d each time}
|
|
1[$101\>][$$." ";$["open
|
|
"]?~["closed
|
|
"]?1+]# {loop through doors, print door number and state}
|