Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
20
Task/Extend-your-language/ArkScript/extend-your-language.ark
Normal file
20
Task/Extend-your-language/ArkScript/extend-your-language.ark
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
(macro if2 (conds bothConditionsAreTrue firstConditionIsTrue secondConditionIsTrue noConditionIsTrue) {
|
||||
# Assuming 'conds' is a node with at least 2 subnodes.
|
||||
# Get its content and evaluate it once, to be able to
|
||||
# refer to it without reevaluating the conditions
|
||||
(let result1 (head conds))
|
||||
(let result2 (@ conds 1))
|
||||
|
||||
(if (and result1 result2)
|
||||
bothConditionsAreTrue
|
||||
(if result1
|
||||
firstConditionIsTrue
|
||||
(if result2
|
||||
secondConditionIsTrue
|
||||
noConditionIsTrue)))})
|
||||
|
||||
(if2 (true false)
|
||||
(print "1")
|
||||
(print "2")
|
||||
(print "3")
|
||||
(print "4"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue