mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
add first version of List.dropAt
* adds an implementation with no uniqueness/mutability
This commit is contained in:
parent
ff9866420b
commit
3baff93a97
11 changed files with 145 additions and 13 deletions
|
@ -920,6 +920,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(list_type(flex(TVAR1))),
|
||||
);
|
||||
|
||||
// dropAt : List elem, Nat -> List elem
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_DROP_AT,
|
||||
vec![list_type(flex(TVAR1)), nat_type()],
|
||||
Box::new(list_type(flex(TVAR1))),
|
||||
);
|
||||
|
||||
// swap : List elem, Nat, Nat -> List elem
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_SWAP,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue