From 071cb05a8b3d6d906fdbcc8e31f2855a08949fa9 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Mon, 13 Jan 2020 21:58:40 +0000 Subject: Type annotations for gleam/iodata --- src/gleam/iodata.gleam | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gleam/iodata.gleam b/src/gleam/iodata.gleam index ed993d1..264bbbe 100644 --- a/src/gleam/iodata.gleam +++ b/src/gleam/iodata.gleam @@ -43,14 +43,18 @@ type Direction { external fn erl_split(Iodata, String, Direction) -> List(Iodata) = "string" "split" -pub fn split(iodata, on pattern) { +pub fn split(iodata: Iodata, on pattern: String) -> List(Iodata) { erl_split(iodata, pattern, All) } external fn erl_replace(Iodata, String, String, Direction) -> Iodata = "string" "replace" -pub fn replace(in iodata, all pattern, with substitute) { +pub fn replace( + in iodata: Iodata, + all pattern: String, + with substitute: String, +) -> Iodata { erl_replace(iodata, pattern, substitute, All) } -- cgit v1.2.3