2024-05-01 19:02:05 +03:00
|
|
|
---
|
|
|
|
source: tests/golden_tests.rs
|
2024-05-15 01:25:46 +03:00
|
|
|
input_file: tests/golden_tests/simplify_matches/complex_with_case.bend
|
2024-05-01 19:02:05 +03:00
|
|
|
---
|
2024-06-05 17:00:43 +03:00
|
|
|
(map) = λa λb (match b { Tree_/Node c d e f: λg (Tree_/Node (map g c) (map g d) (map g e) (map g f)); Tree_/Leaf h: λi (Tree_/Leaf (i h)); } a)
|
2024-05-01 19:02:05 +03:00
|
|
|
|
|
|
|
(main) = map
|
|
|
|
|
2024-06-05 17:00:43 +03:00
|
|
|
(Tree_/Node) = λa λb λc λd λe (e Tree_/Node/tag a b c d)
|
2024-05-01 19:02:05 +03:00
|
|
|
|
2024-06-05 17:00:43 +03:00
|
|
|
(Tree_/Leaf) = λa λb (b Tree_/Leaf/tag a)
|
2024-05-27 21:09:23 +03:00
|
|
|
|
2024-06-05 17:00:43 +03:00
|
|
|
(Tree_/Node/tag) = 0
|
2024-05-27 21:09:23 +03:00
|
|
|
|
2024-06-05 17:00:43 +03:00
|
|
|
(Tree_/Leaf/tag) = 1
|