Boolean
Background
Section titled “Background”Given a file named “pen.json” with:
{ "type": "library", "dependencies": {}}Use boolean literals
Section titled “Use boolean literals”Given a file named “Foo.pen” with:
f = \() boolean { true}
g = \() boolean { false}When I run pen build
Then the exit status should be 0.
Use an and operation
Section titled “Use an and operation”Given a file named “Foo.pen” with:
f = \() boolean { true & false}When I run pen build
Then the exit status should be 0.
Use an or operation
Section titled “Use an or operation”Given a file named “Foo.pen” with:
f = \() boolean { true | false}When I run pen build
Then the exit status should be 0.
Use a not operation
Section titled “Use a not operation”Given a file named “Foo.pen” with:
f = \() boolean { !true}When I run pen build
Then the exit status should be 0.
Use an if expression
Section titled “Use an if expression”Given a file named “Foo.pen” with:
f = \() number { if true { 1 } else { 0 }}When I run pen build
Then the exit status should be 0.