refs #7639
Change-Id: I927c447e0e5a1d6102172c8d99f36c4a79e9138a
::class[Sequence]
::value[!, getList]
-::value[elem]
+::value[elem, elemIndex]
::value[filter, concatMap]
::value[foldl, foldl1, foldr]
::value[unfoldl, unfoldr]
Just el2 -> el == el2
Nothing -> False
+"`elemIndex el lst` returns the index of the first element in the given list `lst` which is equal (by ==) to the query element, or Nothing if there is no such element."
+elemIndex :: a -> [a] -> Maybe Integer
+elemIndex el l = loop 0
+ where
+ len = length l
+ loop i | i < len = if el == l!i
+ then Just i
+ else loop (i+1)
+ | otherwise = Nothing
+
"""
Computes a list that contains only elements that belongs to both input lists.
"""