AList.find /AList.tryFind, etc ? #110
Unanswered
somelinguist
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hey, The things you want are operations on the entire list (at least conceptually) and we simple never had the need for them. I'll look into that once i have a little time |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm still getting familiar with the library. I was wondering if there is a reason
AList.find
,AList.tryFind
,AList.findIndex
,AList.tryFindIndex
, etc. weren't part of the library? Maybe alsopick
/tryPick
?I see that IndexList has implementations for them (except plain
pick
), but was wondering if there were performance reasons for not having them for AList.Is there some other way I should use to make an adaptive value from a single item matching a predicate from a clist/alist?
The closest I've come up with so far is
AList.filter |> AList.tryFirst
, but I'm assuming that goes through the whole list?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions