mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Add Str.repeat builtin
This commit is contained in:
parent
0b02929a53
commit
b32a42f05a
11 changed files with 109 additions and 14 deletions
|
@ -618,6 +618,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
|
|||
Box::new(str_type())
|
||||
);
|
||||
|
||||
// repeat : Str, Nat -> Str
|
||||
add_top_level_function_type!(
|
||||
Symbol::STR_REPEAT,
|
||||
vec![str_type(), nat_type()],
|
||||
Box::new(str_type())
|
||||
);
|
||||
|
||||
// fromUtf8 : List U8 -> Result Str [ BadUtf8 Utf8Problem ]*
|
||||
{
|
||||
let bad_utf8 = SolvedType::TagUnion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue