Skip to content

Commit

Permalink
fix contains
Browse files Browse the repository at this point in the history
  • Loading branch information
brekk committed Mar 27, 2024
1 parent 33e8beb commit 3477267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prelude/__internal__/List.mad
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ export startsWith = (subset, list) => where(#[subset, list]) {
* contains([2, 8, 5], [1, 2, 3, 4, 5, 6]) // false
*/
contains :: Eq a => List a -> List a -> Boolean
export contains = (needle, haystack) => Function.any(startsWith(needle), tails(haystack))
export contains = (needle, haystack) => any(startsWith(needle), tails(haystack))


dropLength :: List a -> List b -> List b
Expand Down

0 comments on commit 3477267

Please sign in to comment.