21 lines
490 B
Plaintext
21 lines
490 B
Plaintext
$a $= [a, b, c] # Char values
|
|
$b $= [A\e, B\e, C\e] # Text values
|
|
$c $= [1, 2, 3] # Int values
|
|
|
|
# Repeat loop
|
|
$i
|
|
repeat($[i], @$a) {
|
|
fn.println(parser.op($a[$i] ||| $b[$i] ||| $c[$i]))
|
|
}
|
|
fn.println()
|
|
|
|
# Foreach loop with zip and reduce
|
|
$ele
|
|
foreach($[ele], fn.arrayZip($a, $b, $c)) {
|
|
fn.println(fn.arrayReduce($ele, \e, fn.concat))
|
|
}
|
|
fn.println()
|
|
|
|
# Foreach function with combinator
|
|
fn.arrayForEach(fn.arrayZip($a, $b, $c), fn.combB(fn.println, fn.combC3(fn.arrayReduce, fn.concat, \e)))
|