2021-08-24 18:44:01 +00:00
|
|
|
fn cset [c t f]{
|
2020-03-13 14:03:36 +00:00
|
|
|
if $c {
|
|
|
|
put $t
|
|
|
|
} else {
|
|
|
|
put $f
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn mset [c t f]{
|
2021-08-24 18:44:01 +00:00
|
|
|
all (cset $c $t $f)
|
2020-03-13 14:03:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn call [c t f @argv]{
|
2021-08-24 18:44:01 +00:00
|
|
|
local:v = (cset $c $t $f)
|
2020-03-13 14:03:36 +00:00
|
|
|
if (is (kind-of $v) fn) {
|
|
|
|
$v $@argv
|
|
|
|
} else {
|
|
|
|
put $v
|
|
|
|
}
|
|
|
|
}
|