29 lines
339 B
Plaintext
29 lines
339 B
Plaintext
|
let x = 123
|
||
|
let y = [1, 2, $x]
|
||
|
|
||
|
fn f(a, b) {
|
||
|
echo ${a}
|
||
|
cat "/some/path/$b.txt"
|
||
|
}
|
||
|
|
||
|
fn g(xs) {
|
||
|
for item in $xs {
|
||
|
echo "* $item"
|
||
|
}
|
||
|
}
|
||
|
|
||
|
fn h() {
|
||
|
let counter = 0
|
||
|
for line in io:lines() {
|
||
|
echo "$counter $line"
|
||
|
counter = $counter + 1
|
||
|
}
|
||
|
}
|
||
|
|
||
|
a \
|
||
|
b \
|
||
|
c
|
||
|
|
||
|
f $x "filename"
|
||
|
g $y | h >output.txt
|