Partial application
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- compilers
Research direction
Start by reproducing the two expressions in the REPL and compare their reduction traces and normal forms. Investigate why partial application of NAND TRUE differs from the manually expanded lambda expression. Done means equivalent expressions produce the same expected result, with the existing reduction output still reporting the correct normal form.
Written by the indexing model from the issue text.
Description
NAND TRUE yields a function which works correctly (λf₂.λa.λb.f₂ba). But when using (NAND TRUE) TRUE get an incorrect result (λa.λb.a) which is different from manually writing (λf₂.λa.λb.f₂ba) TRUE which yields λa.λb.b.
Am I conceptualizing this incorrectly or is this a bug?
> TRUE
λa.λb.a
<function, church boolean true>
> NAND
λf₁.λf₂.λa.λb.f₁(f₂ba)a
<function>
> NAND TRUE
λf₂.λa.λb.f₂ba
<function>
> NAND TRUE TRUE
λa.λb.a
<function, church boolean true>
> (λf₂.λa.λb.f₂ba) TRUE
λa.λb.b
<function, church numeral 0, church boolean false>
> (NAND TRUE) TRUE
λa.λb.a
<function, church boolean true>
> (λf₂.λa.λb.f₂ba) TRUE
λa.λb.b
<function, church numeral 0, church boolean false>(-)
Free Variables:
Rendered from AST: (λf₂.λa.λb.f₂ba)(λa.λb.a)
Beta-reduced: λa.λb.(λa.λb.a)ba
Eta-reduced: [eta irreducible]
Normal Form: λa.λb.b
Normal As Church Numeral: 0
Normal As Church Boolean: false
steps to normal form:
(λf₂.λa.λb.f₂ba)(λa.λb.a)
λa.λb.(λa.λb.a)ba
λa.λb.(λε₁.b)a
λa.λb.b
> (NAND TRUE) TRUE
λa.λb.a
<function, church boolean true>
Free Variables:
Rendered from AST: (λf₁.λf₂.λa.λb.f₁(f₂ba)a)(λa.λb.a)(λa.λb.a)
Beta-reduced: [beta irreducible]
Eta-reduced: [eta irreducible]
Normal Form: λa.λb.a
Normal As Church Numeral: [not a church numeral]
Normal As Church Boolean: true
steps to normal form:
(λf₁.λf₂.λa.λb.f₁(f₂ba)a)(λa.λb.a)(λa.λb.a)
(λf₂.λa.λb.(λa.λb.a)(f₂ba)a)(λa.λb.a)
λa.λb.(λa.λb.a)((λa.λb.a)ba)a
λa.λb.(λε₁.(λa.λb.a)ba)a
λa.λb.(λε₁.λb.a)ba
λa.λb.(λε₁.a)a
λa.λb.a
- Dominant language
- JavaScript
- Stars
- 69
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from evinism/lambda-explorer
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
evinism/lambda-explorer#129 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
evinism/lambda-explorer#128 ·
-
Some typos Open
Difficulty 1/5 Under an hour Newbie friendliness 45/100
evinism/lambda-explorer#119 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
evinism/lambda-explorer#85 ·
-
bad response Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
evinism/lambda-explorer#74 · 2 comments ·
All issues in evinism/lambda-explorer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·