view final_main/src/AgdaElem.agda @ 5:eafc166804f3

fix Capter4.2,5,1
author ryokka
date Mon, 19 Feb 2018 18:44:59 +0900
parents 93d26c4576d3
children
line wrap: on
line source

elem : {A : Set} {{eqA : Eq A}} → A → List A → Bool
elem {{eqA}} x (y ∷ xs) = (Eq._==_ eqA x y) || (elem {{eqA}} x xs)
elem         x []        = false