Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Extend-your-language/Es/extend-your-language-1.es
Normal file
9
Task/Extend-your-language/Es/extend-your-language-1.es
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
fn if2 cond1 cond2 body11 body10 body01 body00 {
|
||||
# Must evaluate both conditions, and should do so in order.
|
||||
# Negation ensures a boolean result: a true condition becomes
|
||||
# 1 for false; a false condition becomes 0 for true.
|
||||
let (c1 = <={! $cond1}; c2 = <={! $cond2}) {
|
||||
# Use those values to pick the body to evaluate.
|
||||
$(body$c1$c2)
|
||||
}
|
||||
}
|
||||
9
Task/Extend-your-language/Es/extend-your-language-2.es
Normal file
9
Task/Extend-your-language/Es/extend-your-language-2.es
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
if2 {test 1 -gt 0} {~ grill foo bar boo} {
|
||||
echo 1 and 2
|
||||
} {
|
||||
echo 1 but not 2
|
||||
} {
|
||||
echo 2 but not 1
|
||||
} {
|
||||
echo neither 1 nor 2
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue