summaryrefslogtreecommitdiff
path: root/spec/inputs/bubbling.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-02-17 11:22:07 +0800
committerLi Jin <dragon-fly@qq.com>2021-02-17 11:22:07 +0800
commit7066392d1c974065181d95d93274136dcd625d43 (patch)
treecf51eafc2c52cbc12246a306bca172d799193d30 /spec/inputs/bubbling.yue
parent90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff)
downloadyuescript-7066392d1c974065181d95d93274136dcd625d43.tar.gz
yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.bz2
yuescript-7066392d1c974065181d95d93274136dcd625d43.zip
stop reusing variables, rename project.
Diffstat (limited to 'spec/inputs/bubbling.yue')
-rw-r--r--spec/inputs/bubbling.yue27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/inputs/bubbling.yue b/spec/inputs/bubbling.yue
new file mode 100644
index 0000000..23a85d4
--- /dev/null
+++ b/spec/inputs/bubbling.yue
@@ -0,0 +1,27 @@
1
2-- vararg bubbling
3f = (...) -> #{...}
4
5dont_bubble = ->
6 [x for x in ((...)-> print ...)("hello")]
7
8k = [x for x in ((...)-> print ...)("hello")]
9
10j = for i=1,10
11 (...) -> print ...
12
13-- bubble me
14
15m = (...) ->
16 [x for x in *{...} when f(...) > 4]
17
18_ = (...)->
19 x = for i in *{...} do i
20 y = [x for x in *{...}]
21 z = [x for x in hallo when f(...) > 4]
22
23 a = for i=1,10 do ...
24
25 b = for i=1,10
26 (...)-> print ...
27