-
Notifications
You must be signed in to change notification settings - Fork 247
searching in list #989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This latter |
In "Generic Level Polymorphic N-ary Functions", I have decide : Π[ P ∪ Q ] → Π[ Any P ∪ All Q ] It seems to also be missing from the stdlib and would also be a fine way |
module _ (P? : Decidable P) where
private
helper : ∀ xs → All (∁ P) xs ⊎ Any P xs
helper = All.decide (Sum.swap ∘ (Dec.toSum ∘ P?))
search : ∀ xs → ¬ Any P xs ⊎ ∃ (\x → x ∈ xs × P x)
search = Sum.map All¬⇒¬Any find ∘ helper But it's not clear (to me, at least) which, if any, of |
I wouldn't be against |
Should we call this function (ie: |
Concerning the essence of the subject (which I do not recall/understand now) , let the team decide, and then I would decide how to apply this. My deal is mainly to suggest an issue. But there is a problem of the English language. My English is not enough to understand may be half of what jamesmckinna writes. I shall be grateful to people if they put sentences somehow in a simpler way. |
Thanks Sergei for the reminder to try to write in simpler language! |
I somehow exaggerated this (a new word for me). At least this latter fragment of
remains totally enigmatic for me. |
Apologies ;again) for having been enigmatic! My intention was to contrast
Excessive jargon, and writing in too much haste on my phone, got in the way this time! |
Searching in a list can be expressed via lib-1.2 as
First, is there a ready function in lib-1.2 to express this?
Second, it is more desirable to have (for a setoid)
Has lib-1.2 something for this?
The text was updated successfully, but these errors were encountered: