Files
newt/src/Data/List.newt
Steve Dunham 2ca43b6350 Dependent records
The projection functions needed `foo` -> `self .foo` in the types
2026-01-05 20:52:35 -08:00

8 lines
196 B
Agda
Raw Blame History

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