mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Add builtin List.intersperse
This commit is contained in:
parent
8f25106b2c
commit
16fb04b4fa
5 changed files with 120 additions and 0 deletions
|
@ -1140,6 +1140,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
)
|
||||
}
|
||||
|
||||
// intersperse : List elem, elem -> List elem
|
||||
add_top_level_function_type!(
|
||||
Symbol::LIST_INTERSPERSE,
|
||||
vec![list_type(flex(TVAR1)), flex(TVAR1)],
|
||||
Box::new(list_type(flex(TVAR1))),
|
||||
);
|
||||
|
||||
// Dict module
|
||||
|
||||
// len : Dict * * -> Nat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue