1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-10 14:56:08 +00:00

add :unless loop modifier

This commit is contained in:
primo-ppcg
2023-09-13 15:21:46 +07:00
parent ff18b92eb0
commit db366558e7
2 changed files with 6 additions and 0 deletions

View File

@@ -186,6 +186,11 @@
(assert (= txs [[-1 -1] [-1 0] [-1 1] [0 -1] [0 1] [1 -1] [1 0] [1 1]])
"nested seq")
# :unless modifier
(assert (deep= (seq [i :range [0 10] :unless (odd? i)] i)
@[0 2 4 6 8])
":unless modifier")
# 515891b03
(assert (deep= (tabseq [i :in (range 3)] i (* 3 i))
@{0 0 1 3 2 6}))