mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-24 02:36:15 +00:00
14 lines
316 B
Bash
14 lines
316 B
Bash
mlr --opprint --from data/small put '
|
|
func f(n) {
|
|
if (is_numeric(n)) {
|
|
if (n > 0) {
|
|
return n * f(n-1);
|
|
} else {
|
|
return 1;
|
|
}
|
|
}
|
|
# implicitly return absent-null if non-numeric
|
|
}
|
|
$ox = f($x + NR);
|
|
$oi = f($i);
|
|
'
|