agda - Checking the Membership of an element in a stream of rational number -
i want write function takes rational number , stream of rationals input , return true if number present in stream else return false.
-- x ∈ xs means x member of xs. infix 4 _∈_ data _∈_ {a} : → stream → set here : ∀ {x xs} → x ∈ x ∷ xs there : ∀ {x y xs} (x∈xs : x ∈ ♭ xs) → x ∈ y ∷ xs this defined in library.
i want write function of following signature.
_elementof_ : ∀ {a} → → stream → bool the problem not understand how proceed here , there.
Comments
Post a Comment