pork/examples/syntax.pork
2023-08-19 20:40:31 -07:00

30 lines
489 B
Plaintext

main = { in
three = 3
two = 2
calculateSimple = { in
(50 + three) * two
}
calculateComplex = { in
three + two + 50
}
multiply = { a, b in
a * b
}
calculateSimpleResult = calculateSimple()
calculateComplexResult = calculateComplex()
multiplyResult = multiply(50, 50)
list = [10, 20, 30]
trueValue = true
falseValue = false
[
calculateSimpleResult,
calculateComplexResult,
multiplyResult,
list,
trueValue,
falseValue
]
}