Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
4
Task/Inverted-syntax/Factor/inverted-syntax-1.factor
Normal file
4
Task/Inverted-syntax/Factor/inverted-syntax-1.factor
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
1 1 + ! 2
|
||||
[ + 1 1 ] reverse call ! 2
|
||||
{ 1 2 3 4 5 } [ sq ] map ! { 1 4 9 16 25 }
|
||||
[ map [ sq ] { 1 2 3 4 5 } ] reverse call ! { 1 4 9 16 25 }
|
||||
3
Task/Inverted-syntax/Factor/inverted-syntax-2.factor
Normal file
3
Task/Inverted-syntax/Factor/inverted-syntax-2.factor
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
MACRO: pre ( quot -- quot ) reverse ;
|
||||
|
||||
[ + 2 2 ] pre ! 4
|
||||
1
Task/Inverted-syntax/Factor/inverted-syntax-3.factor
Normal file
1
Task/Inverted-syntax/Factor/inverted-syntax-3.factor
Normal file
|
|
@ -0,0 +1 @@
|
|||
[ + 3 + 2 2 ] pre ! 7
|
||||
3
Task/Inverted-syntax/Factor/inverted-syntax-4.factor
Normal file
3
Task/Inverted-syntax/Factor/inverted-syntax-4.factor
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
MACRO: pre ( quot -- quot ) 1 cut swap [ 0 ] dip reduce 1quotation ;
|
||||
|
||||
[ + 1 2 3 4 5 ] pre ! 15
|
||||
4
Task/Inverted-syntax/Factor/inverted-syntax-5.factor
Normal file
4
Task/Inverted-syntax/Factor/inverted-syntax-5.factor
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
USE: infix
|
||||
[infix
|
||||
5*(1+1) ! 10
|
||||
infix]
|
||||
Loading…
Add table
Add a link
Reference in a new issue