Created
January 16, 2015 06:26
-
-
Save ryuichiueda/c2fab85a0d9c98ba985d to your computer and use it in GitHub Desktop.
a demo at USP lab. (Jan 16, 2015)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import /usr/bin/ as ub | |
import /bin/ as b | |
# not a Haskell code but a glue code | |
# how to write a procedure (function of bash) | |
proc pppp = | |
import /usr/bin/ as ub | |
ub.seq 1 10 | |
>>= ub.tail -r | |
# how to avoid stopping by an error (avoidacnce of -e of bash) | |
? b.echo 'aho' >>= ub.grep 'boke' | |
# if, else if, else | |
? ub.false | |
this.pppp | |
| ub.true | |
b.echo 'aho' | |
| otherwise | |
b.echo 'boke' | |
# output connection | |
str s = b.echo 'aho2' >> b.echo 'boke2' | |
b.echo s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment