mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 23:31:12 +00:00
adding initial List.all
This commit is contained in:
parent
b03ed18553
commit
d946b84e63
17 changed files with 160 additions and 4 deletions
|
@ -50,6 +50,7 @@ pub enum LowLevel {
|
|||
ListDropAt,
|
||||
ListSwap,
|
||||
ListAny,
|
||||
ListAll,
|
||||
ListFindUnsafe,
|
||||
DictSize,
|
||||
DictEmpty,
|
||||
|
@ -131,6 +132,7 @@ macro_rules! higher_order {
|
|||
| ListKeepErrs
|
||||
| ListSortWith
|
||||
| ListAny
|
||||
| ListAll
|
||||
| ListFindUnsafe
|
||||
| DictWalk
|
||||
};
|
||||
|
@ -162,6 +164,7 @@ impl LowLevel {
|
|||
ListKeepErrs => 1,
|
||||
ListSortWith => 1,
|
||||
ListAny => 1,
|
||||
ListAll => 1,
|
||||
ListFindUnsafe => 1,
|
||||
DictWalk => 2,
|
||||
_ => unreachable!(),
|
||||
|
@ -220,6 +223,7 @@ impl LowLevel {
|
|||
Symbol::LIST_DROP_AT => Some(ListDropAt),
|
||||
Symbol::LIST_SWAP => Some(ListSwap),
|
||||
Symbol::LIST_ANY => Some(ListAny),
|
||||
Symbol::LIST_ALL => Some(ListAll),
|
||||
Symbol::LIST_FIND => None,
|
||||
Symbol::DICT_LEN => Some(DictSize),
|
||||
Symbol::DICT_EMPTY => Some(DictEmpty),
|
||||
|
|
|
@ -1072,6 +1072,7 @@ define_builtins! {
|
|||
47 LIST_FIND: "find"
|
||||
48 LIST_FIND_RESULT: "#find_result" // symbol used in the definition of List.find
|
||||
49 LIST_SUBLIST: "sublist"
|
||||
50 LIST_ALL: "all"
|
||||
}
|
||||
5 RESULT: "Result" => {
|
||||
0 RESULT_RESULT: "Result" imported // the Result.Result type alias
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue