Recursive functions + bugfix for stack reallocation.
This commit is contained in:
1 parent
cbdeddbab8
commit
49cf2e67fe
5 files changed
+32
-10
No files matched your search
@@ -262,6 +262,12 @@ def id(x):x; 2000 as $x | def f(x):1 as $x | id([$x, x, x]); def g(x): 100 as $x
|
||||
999999999
|
||||
[[110.0, 130.0], [210.0, 130.0], [110.0, 230.0], [210.0, 230.0], [120.0, 160.0], [220.0, 160.0], [120.0, 260.0], [220.0, 260.0]]
|
||||
|
||||
# test recursion
|
||||
def fac: if . == 1 then 1 else . * (. - 1 | fac) end; [.[] | fac]
|
||||
[1,2,3,4]
|
||||
[1,2,6,24]
|
||||
|
||||
|
||||
#
|
||||
# Assignment
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user