Drop backslash from lambda definitions

This commit is contained in:
2025-04-15 10:34:38 -05:00
parent 5024a2be4c
commit f2beb86d8a
16 changed files with 181 additions and 182 deletions

View File

@ -18,7 +18,7 @@ main = toSource not?
sourceLeaf = t (head "t")
-- Stem case
sourceStem = (\convert : (\a rest :
sourceStem = (convert : (a rest :
t (head "(") -- Start with a left parenthesis "(".
(t (head "t") -- Add a "t"
(t (head " ") -- Add a space.
@ -26,7 +26,7 @@ sourceStem = (\convert : (\a rest :
(t (head ")") rest)))))) -- Close with ")" and append the rest.
-- Fork case
sourceFork = (\convert : (\a b rest :
sourceFork = (convert : (a b rest :
t (head "(") -- Start with a left parenthesis "(".
(t (head "t") -- Add a "t"
(t (head " ") -- Add a space.
@ -36,7 +36,7 @@ sourceFork = (\convert : (\a b rest :
(t (head ")") rest)))))))) -- Close with ")" and append the rest.
-- Wrapper around triage
toSource_ = y (\self arg :
toSource_ = y (self arg :
triage
sourceLeaf -- `triage` "a" case, Leaf
(sourceStem self) -- `triage` "b" case, Stem
@ -44,7 +44,7 @@ toSource_ = y (\self arg :
arg) -- The term to be inspected
-- toSource takes a single TC term and returns a String
toSource = \v : toSource_ v ""
toSource = v : toSource_ v ""
exampleOne = toSource true -- OUT: "(t t)"
exampleTwo = toSource not? -- OUT: "(t (t (t t) (t t t)) (t t (t t t)))"