2013-04-10 22:43:41 -07:00
|
|
|
fn compose f g {
|
2015-02-20 00:35:01 -05:00
|
|
|
result @ {$g | $f}
|
2013-04-10 22:43:41 -07:00
|
|
|
}
|
|
|
|
|
|
2015-02-20 00:35:01 -05:00
|
|
|
fn downvowel {tr AEIOU aeiou}
|
|
|
|
|
fn upcase {tr a-z A-Z}
|
2013-04-10 22:43:41 -07:00
|
|
|
fn-c = <={compose $fn-downvowel $fn-upcase}
|
2015-02-20 00:35:01 -05:00
|
|
|
echo 'Cozy lummox gives smart squid who asks for job pen.' | c
|
2013-04-10 22:43:41 -07:00
|
|
|
# => CoZY LuMMoX GiVeS SMaRT SQuiD WHo aSKS FoR JoB PeN.
|