Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_austenite/tests/fixtures/eval/foundation/array.txt

1.2 KiB, 1 run

created by r1870400018:63818, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1// array methods that need no function argument and no operator beyond equality.
2(1, 2, 3).len()
3(1, 2, 3).first()
4(1, 2, 3).last()
5(1, 2).first(default: 0)
6().first(default: 0)
7().last(default: "x")
8(1, 2, 3).at(1)
9(1, 2, 3).at(-1)
10(1, 2, 3).at(5, default: 9)
11(1, 2, 3).slice(1)
12(1, 2, 3).slice(1, count: 1)
13(1, 2, 3).slice(2, 1)
14(1, 2, 3).slice(-2)
15(1, 2, 3).contains(2)
16(1, 2, 3).contains(2.0)
17("a", "b").contains("c")
18(1, 2, 3).enumerate(start: 1)
19("a", "b").enumerate()
20(1, 2).zip((3, 4, 5))
21(1, 2).zip((3, 4), ("a", "b"))
22(1, 2).zip()
23(1, (2, (3,)), 4).flatten()
24(1, 2, 3).rev()
25(1, 2, 3, 2).split(2)
26(1, 2, 3).intersperse(0)
27(1, 2, 3, 4, 5).chunks(2)
28(1, 2, 3, 4, 5).chunks(2, exact: true)
29(1, 2, 3).windows(2)
30(1, 2).windows(3)
31(1, 2, 1, 3, 2).dedup()
32(("a", 1), ("b", 2)).to-dict()
33((1, 2), (3, 4)).flatten()
34().rev()
35!(1, 2, 3).push(4)
36!(1, 2, 3).pop()
37!(1, 2, 3).insert(1, 9)
38!(1, 2, 3).remove(0)
39!(1, 2, 3).remove(5, default: 9)
40!().pop(default: 0)
41!(1, 2, 3).at(5)
42!(1, 2, 3).at(-4)
43!(1, 2, 3).slice(1, 5)
44!(1, 2, 3).slice(-5)
45!().first()
46!().last()
47!(1, 2).zip((3, 4, 5), exact: true)
48!(1, 2).zip((3,), (4, 5), exact: true)
49!(1, 2, 3).chunks(0)
50!(1, 2, 3).windows(0)
51!(("a", 1, 3),).to-dict()
52!((1, 1),).to-dict()
53!(1, 2).first(5)
54!().sum()
55!().product()