First pass at a scheme backend
Some checks failed
Publish Playground / build (push) Has been cancelled
Publish Playground / deploy (push) Has been cancelled

This commit is contained in:
2026-03-16 17:03:33 -07:00
parent 92ced8dcd2
commit fe96f46534
23 changed files with 586 additions and 107 deletions

View File

@@ -9,6 +9,13 @@ snoclen {a} xs = go xs Z
go Lin acc = acc
go (xs :< x) acc = go xs (S acc)
snoclen' : a. SnocList a Int
snoclen' {a} xs = go xs 0
where
go : SnocList a Int Int
go Lin acc = acc
go (xs :< x) acc = go xs (1 + acc)
snocelem : a. {{Eq a}} a SnocList a Bool
snocelem a Lin = False
snocelem a (xs :< x) = if a == x then True else snocelem a xs