✨
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
[1, 2, 3]
|
||||
{1;2;3;}
|
||||
3
|
||||
2
|
||||
|
1
tests/22_reverse.expected
Normal file
1
tests/22_reverse.expected
Normal file
@ -0,0 +1 @@
|
||||
{5;4;3;2;1;}
|
10
tests/22_reverse.plthy
Normal file
10
tests/22_reverse.plthy
Normal file
@ -0,0 +1,10 @@
|
||||
hello|
|
||||
set {1;2;3;4;5;} -> list|
|
||||
set {} -> reversed|
|
||||
set 0 -> i|
|
||||
do [
|
||||
set {variable list{variable i};} + variable reversed -> reversed|
|
||||
set variable i + 1 -> i|
|
||||
] until variable i = do len<variable list;>|
|
||||
do print<variable reversed;>|
|
||||
goodbye|
|
1
tests/23_int.expected
Normal file
1
tests/23_int.expected
Normal file
@ -0,0 +1 @@
|
||||
4
|
4
tests/23_int.plthy
Normal file
4
tests/23_int.plthy
Normal file
@ -0,0 +1,4 @@
|
||||
hello|
|
||||
set '2' -> x|
|
||||
do print<2 + do int<variable x;>;>|
|
||||
goodbye|
|
Reference in New Issue
Block a user