> Junctions are mostly a bit of syntax around any/all
A quick look at Raku junctions makes me think they're basically a slightly tarted-up version of Icon's generators and goal-directed execution (which is no bad thing, of course but hardly novel.)
Junctions autothread. What does that mean? Using a Junction as an ordinary value, will cause execution for each of the eigenstates, and result in another Junction with the result of each of the executions. An example:
# a simple sub showing its arg, returning twice the value
sub foo($bar) { say $bar; 2 * $bar }
# a simple "or" junction
my $a = 1 | 2 | 3;
say foo($a); # executes for each of eigenstates
# 1
# 2
# 3
# any(2, 4, 6)
A quick look at Raku junctions makes me think they're basically a slightly tarted-up version of Icon's generators and goal-directed execution (which is no bad thing, of course but hardly novel.)