This commit is contained in:
2024-12-20 12:39:51 -08:00
parent f2c6b409fe
commit 567a357dee
8 changed files with 136 additions and 4 deletions

View File

@@ -761,3 +761,7 @@ instance ∀ a. {{Eq a}} → Eq (List a) where
Nil == Nil = True
(x :: xs) == (y :: ys) = if x == y then xs == ys else False
_ == _ = False
find : a. (a Bool) List a Maybe a
find f Nil = Nothing
find f (x :: xs) = if f x then Just x else find f xs