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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -