Skip to content

Commit

Permalink
Replace foldl by any. #82
Browse files Browse the repository at this point in the history
  • Loading branch information
epost committed Oct 20, 2018
1 parent 5517b4b commit b2e4a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Language/Mapping.hs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ conv'' ((ty2,ty):tl) = case cast ty :: Maybe ty of
Nothing -> Left $ "Not in target schema/typeside: " ++ show ty

elem' :: (Typeable t, Typeable a, Eq a) => t -> [a] -> Bool
elem' x ys = maybe False (\x' -> foldl (\acc y -> acc || y == x') False ys) (cast x)
elem' x ys = maybe False (\x' -> any ((==) x') ys) (cast x)

member' :: (Typeable t, Typeable a, Eq a) => t -> Map a v -> Bool
member' k m = elem' k (Map.keys m)
Expand Down

0 comments on commit b2e4a1c

Please sign in to comment.