Skip to content

Map

Given a file named “pen.json” with:

{
"type": "library",
"dependencies": {}
}

Given a file named “Foo.pen” with:

f = \() {string: number} {
{string: number}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \() {string: number} {
{string: number "foo": 42}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \() {string: number} {
{string: number "foo": 1, "bar": 2}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) number {
if x = xs["foo"] {
x
} else {
0
}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) {string: number} {
{string: number ...xs, ...xs}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) {string | none: number | none} {
{string | none: number | none ...xs}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \() {string|none:number} {
{string|none:number "foo": 1, none: 2}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \() {string: number | none} {
{string: number | none "foo": 42, "bar": none}
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) [string] {
keys(xs)
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) [number] {
values(xs)
}

When I successfully run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) number {
size(xs)
}

When I run pen build

Then the exit status should be 0.

Given a file named “Foo.pen” with:

f = \(xs {string: number}) {string: number} {
delete(xs, "foo")
}

When I run pen build

Then the exit status should be 0.