porting WIP

This commit is contained in:
2025-01-01 20:24:53 -08:00
parent 9ed2b2077d
commit e41e1d8f6a
24 changed files with 2118 additions and 16 deletions

14
done/Data/SnocList.newt Normal file
View File

@@ -0,0 +1,14 @@
module Data.SnocList
import Prelude
snoclen : a. SnocList a Nat
snoclen {a} xs = go xs Z
where
go : SnocList a Nat Nat
go Lin acc = acc
go (xs :< x) acc = go xs (S 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