summaryrefslogtreecommitdiff
path: root/spec/inputs/funcs.yue
blob: 0e45ff12d8eb45e73ea72aa9cb1c89711c35076c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161


x = -> print what

_ = ->

_ = -> -> ->

go to the barn

open -> the -> door

open ->
	the door
	hello = ->
		my func

h = -> hi

eat ->, world


(->)()

x = (...) ->

hello!
hello.world!

_ = hello!.something
_ = what!["ofefe"]

what! the! heck!

_ = (a,b,c,d,e) ->

_ = (a,a,a,a,a) ->
	print a

_ = (x=23023) ->

_ = (x=(y=()->) ->) ->

_ = (x = if something then yeah else no) ->

something = (hello=100, world=(x=[[yeah cool]])-> print "eat rice") ->
	print hello

_ = () =>
_ = (x, y) =>
_ = (@x, @y) =>
_ = (x=1) =>
_ = (@x=1,y,@z="hello world") =>


x -> return
y -> return 1
z -> return 1, "hello", "world"
k -> if yes then return else return

_ = -> real_name if something

--

d(
	->
		print "hello world"
	10
)



d(
	1,2,3
	4
	5
	6

	if something
		print "okay"
		10

	10,20
)


f(
	
	)(
	
	)(
		what
	)(->
		print "srue"
	123)

--

x = (a,
	b) ->
	 print "what"


y = (a="hi",
	b=23) ->
		print "what"

z = (
	a="hi",
	b=23) ->
		print "what"


j = (f,g,m,
	a="hi",
	b=23
) ->
		print "what"


y = (a="hi",
	b=23,
	...) ->
		print "what"


y = (a="hi",
	b=23,
	...
) ->
		print "what"

--

args = (a
	b) ->
		print "what"


args = (a="hi"
	b=23) ->
		print "what"

args = (
	a="hi"
	b=23) ->
		print "what"


args = (f,g,m
	a="hi"
	b=23
) ->
		print "what"


@ = (n)->
	return 1 if n == 0
	n * @(n-1)

nil