Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,36 @@
|
|||
[ stack ] is switch.arg ( --> [ )
|
||||
|
||||
[ switch.arg put ] is switch ( x --> )
|
||||
|
||||
[ switch.arg release ] is otherwise ( --> )
|
||||
|
||||
[ switch.arg share
|
||||
!= iff ]else[ done
|
||||
otherwise
|
||||
]'[ do ]done[ ] is case ( x --> )
|
||||
|
||||
[ say "Applying: "
|
||||
swap echo$ sp
|
||||
temp take
|
||||
temp take
|
||||
swap rot do
|
||||
temp put ] is apply ( $ x --> )
|
||||
|
||||
[ say "Pushing: " dup echo$ sp
|
||||
$->n drop temp put ] is isnumber ( $ --> )
|
||||
|
||||
[ temp copy echo cr ] is display ( --> )
|
||||
|
||||
[ nest$ witheach
|
||||
[ dup switch
|
||||
[ $ '+' case [ ' + apply ]
|
||||
$ '-' case [ ' - apply ]
|
||||
$ '*' case [ ' * apply ]
|
||||
$ '/' case [ ' / apply ]
|
||||
$ '^' case [ ' ** apply ]
|
||||
otherwise [ isnumber ] ]
|
||||
display ]
|
||||
temp take ] is rpncalc ( $ --> n )
|
||||
|
||||
$ "3 4 2 * 1 5 - 2 3 ^ ^ / +" rpncalc
|
||||
say "Result: " echo
|
||||
Loading…
Add table
Add a link
Reference in a new issue