tak.wul
· 450 B · Text
Surowy
Playground
{ @ewe ( 8 4 7 tak @ewe.call ) }
@ewe def tak ; @ewe.stack ~( $x $y $z ) {
@ewe (
$x $y $z
$y $x @ewe.lt @ewe.not tak.true tak.false @ewe.if
)
}
@ewe def tak.true ; @ewe.stack ~( $x $y $z ) {
@ewe (
$x 1 @ewe.sub $y $z tak @ewe.call
$y 1 @ewe.sub $z $x tak @ewe.call
$z 1 @ewe.sub $x $y tak @ewe.call
tak @ewe.call
)
}
@ewe def tak.false ; @ewe.stack ~( $x $y $z ) {
@ewe $z
}
| 1 | |
| 2 | { @ewe ( 8 4 7 tak @ewe.call ) } |
| 3 | |
| 4 | @ewe def tak ; @ewe.stack ~( $x $y $z ) { |
| 5 | @ewe ( |
| 6 | $x $y $z |
| 7 | $y $x @ewe.lt @ewe.not tak.true tak.false @ewe.if |
| 8 | ) |
| 9 | } |
| 10 | |
| 11 | @ewe def tak.true ; @ewe.stack ~( $x $y $z ) { |
| 12 | @ewe ( |
| 13 | $x 1 @ewe.sub $y $z tak @ewe.call |
| 14 | $y 1 @ewe.sub $z $x tak @ewe.call |
| 15 | $z 1 @ewe.sub $x $y tak @ewe.call |
| 16 | tak @ewe.call |
| 17 | ) |
| 18 | } |
| 19 | |
| 20 | @ewe def tak.false ; @ewe.stack ~( $x $y $z ) { |
| 21 | @ewe $z |
| 22 | } |
| 23 | |
| 24 |