Block
Background
Section titled “Background”Given a file named “pen.json” with:
{ "type": "library", "dependencies": {}}Define a variable
Section titled “Define a variable”Given a file named “Foo.pen” with:
f = \(x number) number { y = x
y}When I run pen build
Then the exit status should be 0.
Call a function
Section titled “Call a function”Given a file named “Foo.pen” with:
f = \() none { none}
g = \() none { f()
none}When I run pen build
Then the exit status should be 0.
Use if expression
Section titled “Use if expression”Given a file named “Foo.pen” with:
f = \() none { none}
g = \() none { none}
h = \(x boolean) none { if x { f() } else { g() }
none}When I run pen build
Then the exit status should be 0.