mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-02 21:00:56 +00:00
39 lines
612 B
Plaintext
39 lines
612 B
Plaintext
/* main function */
|
|
main = { in
|
|
three = 3
|
|
two = 2
|
|
calculateSimple = { in
|
|
(50 + three) * two
|
|
}
|
|
calculateComplex = { in
|
|
three + two + 50
|
|
}
|
|
multiply = { a, b in
|
|
a * b
|
|
}
|
|
|
|
// calculates the result
|
|
calculateSimpleResult = calculateSimple()
|
|
calculateComplexResult = calculateComplex()
|
|
multiplyResult = multiply(50, 50)
|
|
|
|
list = [10, 20, 30]
|
|
trueValue = true
|
|
falseValue = false
|
|
|
|
invert = { value in
|
|
!value
|
|
}
|
|
|
|
[
|
|
calculateSimpleResult,
|
|
calculateComplexResult,
|
|
multiplyResult,
|
|
list,
|
|
trueValue,
|
|
falseValue,
|
|
invert(true),
|
|
invert(false)
|
|
]
|
|
}
|