mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Implement List.any
This commit is contained in:
parent
0e500ba33c
commit
44938a9e35
15 changed files with 137 additions and 6 deletions
|
@ -2160,6 +2160,13 @@ fn list_sort_with() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_any() {
|
||||
assert_evals_to!("List.any [] (\\e -> e > 3)", false, bool);
|
||||
assert_evals_to!("List.any [ 1, 2, 3 ] (\\e -> e > 3)", false, bool);
|
||||
assert_evals_to!("List.any [ 1, 2, 4 ] (\\e -> e > 3)", true, bool);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = r#"Roc failed with message: "invalid ret_layout""#)]
|
||||
fn lists_with_incompatible_type_param_in_if() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue