Bend/tests/snapshots/encode_pattern_match__bool.bend.snap
2024-05-29 09:57:40 +02:00

38 lines
1.1 KiB
Plaintext

---
source: tests/golden_tests.rs
input_file: tests/golden_tests/encode_pattern_match/bool.bend
---
Scott
(not) = λa (a bool/false bool/true)
(and) = λa (a λb (b bool/true bool/false) λd (d bool/false bool/false))
(and2) = λa (a λb b λd let * = d; bool/false)
(and3) = λa (a λb (b bool/true bool/false) λd let * = d; bool/false)
(and4) = λa (a λb (b bool/true bool/false) λd let * = d; bool/false)
(bool/true) = λa λ* a
(bool/false) = λ* λb b
NumScott
(not) = λa (a λb switch b { 0: bool/false; _: λ* bool/true; })
(and) = λa (a λb switch b { 0: λc (c λe switch e { 0: bool/true; _: λ* bool/false; }); _: λ* λf (f λh switch h { 0: bool/false; _: λ* bool/false; }); })
(and2) = λa (a λb switch b { 0: λc c; _: λ* λe let * = e; bool/false; })
(and3) = λa (a λb switch b { 0: λc (c λe switch e { 0: bool/true; _: λ* bool/false; }); _: λ* λf let * = f; bool/false; })
(and4) = λa (a λb switch b { 0: λc (c λe switch e { 0: bool/true; _: λ* bool/false; }); _: λ* λf let * = f; bool/false; })
(bool/true) = λa (a bool/true/tag)
(bool/false) = λa (a bool/false/tag)
(bool/true/tag) = 0
(bool/false/tag) = 1