This commit is contained in:
2024-02-23 16:00:19 +01:00
parent 1a793bebe7
commit 6234f3fb50
11 changed files with 111 additions and 26 deletions

View File

@ -1,3 +1,3 @@
[1, 2, 3]
{1;2;3;}
3
2

View File

@ -0,0 +1 @@
{5;4;3;2;1;}

10
tests/22_reverse.plthy Normal file
View 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
View File

@ -0,0 +1 @@
4

4
tests/23_int.plthy Normal file
View File

@ -0,0 +1,4 @@
hello|
set '2' -> x|
do print<2 + do int<variable x;>;>|
goodbye|