2021-12-11 21:09:02 +00:00
|
|
|
fn cset {|c t f|
|
2020-03-13 14:03:36 +00:00
|
|
|
if $c {
|
|
|
|
put $t
|
|
|
|
} else {
|
|
|
|
put $f
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-11 21:09:02 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2021-12-11 21:09:02 +00:00
|
|
|
fn call {|c t f @argv|
|
2021-08-27 20:06:49 +00:00
|
|
|
var v = (cset $c $t $f)
|
2020-03-13 14:03:36 +00:00
|
|
|
if (is (kind-of $v) fn) {
|
|
|
|
$v $@argv
|
|
|
|
} else {
|
|
|
|
put $v
|
|
|
|
}
|
|
|
|
}
|