File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change 7
7
See L < Sub|/type/Sub > on how to define routines and work with them.
8
8
9
9
10
- = head2 X < emit >
11
-
12
- Defined as
13
-
14
- sub emit(\value --> Nil)
15
-
16
- If used outside any supply or react block, throws an exception C < emit without
17
- supply or react > . Within a L < Supply|/type/Supply > block, it will add a message to the stream.
18
-
19
- = begin code
20
- my $supply = supply {
21
- for 1 .. 10 {
22
- emit($_);
23
- }
24
- }
25
- $supply.tap( -> $v { say "First : $v" });
26
- = end code
27
-
28
- See also L < the page for C < emit > methods|/routine/emit > .
29
-
30
- = head2 X < undefine >
31
-
32
- Defined as:
33
-
34
- multi sub undefine(Mu \x)
35
- multi sub undefine(Array \x)
36
- multi sub undefine(Hash \x)
37
-
38
- B < DEPRECATED > in 6.d language version and will be removed in 6.e. For L < Array|/type/Array >
39
- and L < Hash|/type/Hash > , it will become equivalent to assigning L < Empty|/type/Slip#index-entry-Empty-Empty > ; for everything
40
- else, equivalent to assigning L < Nil|/type/Nil > , whose use is advised.
41
10
42
11
= end pod
43
12
You can’t perform that action at this time.
0 commit comments