mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 03:45:29 +03:00
26 lines
459 B
Plaintext
26 lines
459 B
Plaintext
---
|
|
source: tests/golden_tests.rs
|
|
input_file: tests/golden_tests/encode_pattern_match/bool_tup.bend
|
|
---
|
|
Scott
|
|
(foo) = λa let (b, c) = a; (b λd d λ* Bool/F c)
|
|
|
|
(main) = (foo (Bool/F, Bool/T))
|
|
|
|
(Bool/T) = λa λ* a
|
|
|
|
(Bool/F) = λ* λb b
|
|
|
|
NumScott
|
|
(foo) = λa let (b, c) = a; (b λd switch d { 0: λe e; _: λ* λ* Bool/F; } c)
|
|
|
|
(main) = (foo (Bool/F, Bool/T))
|
|
|
|
(Bool/T) = λa (a Bool/T/tag)
|
|
|
|
(Bool/F) = λa (a Bool/F/tag)
|
|
|
|
(Bool/T/tag) = 0
|
|
|
|
(Bool/F/tag) = 1
|