mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge pull request #3399 from rtfeldman/pure-roc-map-with-index
Pure Roc `List.mapWithIndex`
This commit is contained in:
commit
93dbda9ac5
31 changed files with 231 additions and 367 deletions
|
@ -41,7 +41,6 @@ pub enum LowLevel {
|
|||
ListMap2,
|
||||
ListMap3,
|
||||
ListMap4,
|
||||
ListMapWithIndex,
|
||||
ListSortWith,
|
||||
ListSublist,
|
||||
ListDropAt,
|
||||
|
@ -126,7 +125,7 @@ pub enum LowLevel {
|
|||
|
||||
macro_rules! higher_order {
|
||||
() => {
|
||||
ListMap | ListMap2 | ListMap3 | ListMap4 | ListMapWithIndex | ListSortWith | DictWalk
|
||||
ListMap | ListMap2 | ListMap3 | ListMap4 | ListSortWith | DictWalk
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -147,7 +146,6 @@ impl LowLevel {
|
|||
ListMap2 => 2,
|
||||
ListMap3 => 3,
|
||||
ListMap4 => 4,
|
||||
ListMapWithIndex => 1,
|
||||
ListSortWith => 1,
|
||||
DictWalk => 2,
|
||||
_ => unreachable!(),
|
||||
|
@ -216,7 +214,6 @@ impl LowLevelWrapperType {
|
|||
Symbol::LIST_MAP2 => WrapperIsRequired,
|
||||
Symbol::LIST_MAP3 => WrapperIsRequired,
|
||||
Symbol::LIST_MAP4 => WrapperIsRequired,
|
||||
Symbol::LIST_MAP_WITH_INDEX => WrapperIsRequired,
|
||||
Symbol::LIST_SORT_WITH => WrapperIsRequired,
|
||||
Symbol::LIST_SUBLIST => WrapperIsRequired,
|
||||
Symbol::LIST_DROP_AT => CanBeReplacedBy(ListDropAt),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue