From 3f5372a955b02f07869a8679cdaeee7bb6033cb6 Mon Sep 17 00:00:00 2001 From: LunaAmora Date: Wed, 10 Jan 2024 08:52:34 -0400 Subject: [PATCH] Fix Tagged Lambdas info on the readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 989950d7..0524b7dc 100644 --- a/README.md +++ b/README.md @@ -264,19 +264,19 @@ Similarly to dups and sups, lambdas and applications can have labels too. For example, data types can be encoded as tagged lambdas: ```rs // data Bool = T | F -T = @#Bool t @#Bool f t -F = @#Bool t @#Bool f f +T = λ#Bool t λ#Bool f t +F = λ#Bool t λ#Bool f f // data List = (Cons x xs) | Nil -Cons = @x @xs @#List c @#List n (#List c x xs) -Nil = @#List c @#List n n +Cons = λx λxs λ#List c λ#List n (#List.Cons.xs (#List.Cons.x c x) xs) +Nil = λ#List c λ#List n n ``` When encoding the pattern matching, the application can then use the same label: ```rs -// not = @bool match bool { T: (F) F: (T) } -not = @bool (#Bool bool F T) +// not = λbool match bool { T: (F) F: (T) } +not = λbool (#Bool bool F T) ``` This allows, in some limited* scenarios, automatic vectorization: