aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/comprehension_nested.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
commitf1454bbbd13a71da2005ff789cde2da0e9eb81f6 (patch)
tree37131187f4218dd3ebec049101c28a161e7ca289 /spec/inputs/comprehension_nested.yue
parent604a8e5e53cdc7391a502fcabf07e8f1cc2a778c (diff)
downloadyuescript-main.tar.gz
yuescript-main.tar.bz2
yuescript-main.zip
Adding tests.HEADmain
Diffstat (limited to '')
-rw-r--r--spec/inputs/comprehension_nested.yue3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/inputs/comprehension_nested.yue b/spec/inputs/comprehension_nested.yue
new file mode 100644
index 0000000..c60419d
--- /dev/null
+++ b/spec/inputs/comprehension_nested.yue
@@ -0,0 +1,3 @@
1list = {1, 2, 3}
2pairs = ["#{i}-#{j}" for i in *list when i % 2 == 1 for j in *list when j > i]
3print table.concat pairs, ","