tak.nv
· 880 B · Text
Surowy
Playground
||
:: tak 7 4 8
:: print return
|:: tak $x $y $z |
:: check if $y less than $x
:: if Yes then recurse tak $x $y $z
:: if Nah then return $z
|:: check if $x $want than $y :@math: $want| :vote: Yes
|:: check if $x $want than $y :@math: $got| :vote: Nah
|:: check if $x $want than $y?|
:@math: compare $x $y
|:: if Yes then recurse tak $x $y $z :: if Nah then return $_ :vote: Yes|
:: next tak $x $y $z
:: next tak $y $z $x
:: next tak $z $x $y
:: next tak
|:: if Yes then recurse tak $x $y $_ :: if Nah then return $z :vote: Nah|
:return: $z
|:: next tak $_ $y $z :@math: $x|
:: tak $x $y $z
|:: next tak $x $y $z?|
:@math: subtract $x 1
|:: next tak :return: ($z $y $x)|
:: tak $x $y $z
|:: waiting tak _ $y $z :@math: $x|
:: tak $x $y $z
|:: print return :return: $x|
:: print (formatted)
:message: "{%d}\n" :arguments: $x :arguments:
| 1 | || |
| 2 | :: tak 7 4 8 |
| 3 | :: print return |
| 4 | |
| 5 | |:: tak $x $y $z | |
| 6 | :: check if $y less than $x |
| 7 | :: if Yes then recurse tak $x $y $z |
| 8 | :: if Nah then return $z |
| 9 | |
| 10 | |:: check if $x $want than $y :@math: $want| :vote: Yes |
| 11 | |:: check if $x $want than $y :@math: $got| :vote: Nah |
| 12 | |:: check if $x $want than $y?| |
| 13 | :@math: compare $x $y |
| 14 | |
| 15 | |:: if Yes then recurse tak $x $y $z :: if Nah then return $_ :vote: Yes| |
| 16 | :: next tak $x $y $z |
| 17 | :: next tak $y $z $x |
| 18 | :: next tak $z $x $y |
| 19 | :: next tak |
| 20 | |
| 21 | |:: if Yes then recurse tak $x $y $_ :: if Nah then return $z :vote: Nah| |
| 22 | :return: $z |
| 23 | |
| 24 | |:: next tak $_ $y $z :@math: $x| |
| 25 | :: tak $x $y $z |
| 26 | |:: next tak $x $y $z?| |
| 27 | :@math: subtract $x 1 |
| 28 | |
| 29 | |:: next tak :return: ($z $y $x)| |
| 30 | :: tak $x $y $z |
| 31 | |
| 32 | |:: waiting tak _ $y $z :@math: $x| |
| 33 | :: tak $x $y $z |
| 34 | |
| 35 | |:: print return :return: $x| |
| 36 | :: print (formatted) |
| 37 | :message: "{%d}\n" :arguments: $x :arguments: |