ABCDEFGHIJKLMNOPQRST
1
2
Capture expectations:Rules, as currently I understand (ruoso)
3
Capture ~~ Positional | List | Array # to be collapsed later
4
(), (1), and (1,2,3) all produce capturesCapture ~~ Associative | Mapping | Hash # to be collapsed later
5
Nil is just another way of saying ()infix:<,> is the Capture generator
6
Nil.perl and ().perl should result in "()"Using a Capture in item context will:
7
().elems is 0, (1,2,3).elems is 3 * If there is one, and only one, item, return that item
8
($x).elems would end up invoking $x's .elems methodThis is the Capture DWIM* otherwise get the capture itself
9
in fact, any capture with exactly one positional element delegates method calls to that element
10
(@a, @b).elems would produce ... ?
11
12
there ought to be a .elems-ish method that a capture can respond to
13
i.e., how do we get ( (), (), () ) to return 3 ?
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