Data update

This commit is contained in:
Ingy döt Net 2024-07-13 15:19:22 -07:00
parent 29a5eea0d4
commit 5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions

View file

@ -1,2 +1 @@
.x()
# call user-defined function
x()

View file

@ -1,2 +1 @@
write(.key, ": ", .value)
# call built-in with parentheses
write(somestring)

View file

@ -1,2 +1 @@
write .key, ": ", .value
# call built-in with unbounded list
writeln a, b, c

View file

@ -1,3 +1,2 @@
writeln "numbers: ", join ", ", [.a1, .a2, .a3, .a4]
# unbounded lists on writeln and join
# later function join takes remaining arguments
a -> len
# passes a to the len() function

View file

@ -1,3 +1 @@
writeln "numbers: ", join(", ", [.a1, .a2, .a3, .a4]), " === "
# unbounded list on writeln
# join using parentheses so it doesn't take remaining arguments
val fibonacci = fn x:if x < 2 { x } else { fn((x - 1)) + fn((x - 2)) }

View file

@ -1,7 +1 @@
val .sum = foldfrom(
fn(.sum, .i, .c) .sum + number(.c, 36) * .weight[.i],
0,
pseries len .code,
split .code,
)
# split, pseries, and len using unbounded lists, ending before comma preceding line return
mapX(amb, wordsets...)

View file

@ -1,4 +0,0 @@
for .key in sort(keys .tests) {
...
}
# unbounded list on keys bounded by closing parenthesis of sort