Created
October 12, 2010 19:40
-
-
Save lsparrish/622781 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chain: stacks' | |
| {{ | |
| variable this | |
| : stack ( -n ) this @ ; | |
| ---reveal--- | |
| : :| ( n- ) this ! ; | |
| : |: ( "- ) create here dup :| , 100 allot ; | |
| : \ ( n- ) stack ++ stack @ ! ; | |
| : / ( -n ) stack @ stack -- @ ; | |
| }} | |
| ;chain | |
| with stacks' | |
| |: box1 | |
| 10 | |
| \ | |
| 20 | |
| \ | |
| / .s | |
| / .s | |
| \ | |
| \ | |
| |: box2 | |
| 30 | |
| \ | |
| 40 | |
| \ | |
| / | |
| / .s | |
| box1 :| | |
| / | |
| / | |
| .s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment