2024-01-16 16:44:01 +03:00
|
|
|
---
|
|
|
|
source: tests/golden_tests.rs
|
2024-05-15 01:25:46 +03:00
|
|
|
input_file: tests/golden_tests/encode_pattern_match/and3.bend
|
2024-01-16 16:44:01 +03:00
|
|
|
---
|
2024-05-18 15:01:20 +03:00
|
|
|
Scott
|
2024-05-10 22:42:32 +03:00
|
|
|
(And) = λa let (b, c, d) = a; (b λe λf (e λg (g Bool/T Bool/F) λ* Bool/F f) λ* λ* Bool/F c d)
|
2024-02-07 18:19:07 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(main) = (And (Bool/F, Bool/T, Bool/F))
|
2024-02-09 20:08:25 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Bool/T) = λa λ* a
|
2024-03-19 20:37:30 +03:00
|
|
|
|
2024-05-10 22:42:32 +03:00
|
|
|
(Bool/F) = λ* λb b
|
2024-05-18 15:01:20 +03:00
|
|
|
|
|
|
|
NumScott
|
|
|
|
(And) = λa let (b, c, d) = a; (b λe switch e { 0: λf λg (f λh switch h { 0: λi (i λj switch j { 0: Bool/T; _: λ* Bool/F; }); _: λ* λ* Bool/F; } g); _: λ* λ* λ* Bool/F; } c d)
|
|
|
|
|
|
|
|
(main) = (And (Bool/F, Bool/T, Bool/F))
|
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Bool/T) = λa (a Bool/T/tag)
|
2024-05-18 15:01:20 +03:00
|
|
|
|
2024-05-27 21:09:23 +03:00
|
|
|
(Bool/F) = λa (a Bool/F/tag)
|
|
|
|
|
|
|
|
(Bool/T/tag) = 0
|
|
|
|
|
|
|
|
(Bool/F/tag) = 1
|