elm-community / array-extra

convenience functions for working with Array

Home Page:http://package.elm-lang.org/packages/elm-community/array-extra/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Array.member

pravdomil opened this issue · comments

Should we add something like this?

{-| To check if array contains value.
-}
member : a -> Array a -> Bool
member needle haystack =
    Array.foldr (\item acc -> acc || item == needle) False haystack
commented

included in #32