Dependent records

The projection functions needed `foo` -> `self .foo` in the types
This commit is contained in:
2026-01-05 20:52:35 -08:00
parent 80b0faf9c4
commit 2ca43b6350
5 changed files with 83 additions and 17 deletions

7
src/Data/List.newt Normal file
View File

@@ -0,0 +1,7 @@
module Data.List
import Prelude
lookup : a b. {{Eq a}} a List (a × b) Maybe b
lookup key Nil = Nothing
lookup key ((k,v) :: rest) = if k == key then Just v else lookup key rest