mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 03:45:29 +03:00
22 lines
423 B
Plaintext
22 lines
423 B
Plaintext
---
|
|
source: tests/golden_tests.rs
|
|
input_file: tests/golden_tests/encode_pattern_match/match_syntax.bend
|
|
---
|
|
Scott
|
|
(head) = λa (a λb λ* b List_/Nil)
|
|
|
|
(List_/Cons) = λa λb λc λ* (c a b)
|
|
|
|
(List_/Nil) = λ* λb b
|
|
|
|
NumScott
|
|
(head) = λa (a λb switch b { 0: λc λ* c; _: λ* List_/Nil; })
|
|
|
|
(List_/Cons) = λa λb λc (c List_/Cons/tag a b)
|
|
|
|
(List_/Nil) = λa (a List_/Nil/tag)
|
|
|
|
(List_/Cons/tag) = 0
|
|
|
|
(List_/Nil/tag) = 1
|