From d6dd21f173fac9919e818db7761a29ed99f17d5d Mon Sep 17 00:00:00 2001 From: Alex Rothuis Date: Fri, 28 Oct 2022 17:39:20 +0200 Subject: Unpublish do_to_graphemes This was introduced to benefit tail call optimization #338, but I don't think the intention was to allow users to use this function (all other `do_*` functions are private). --- src/gleam/string.gleam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam index 9c1bc9e..97a0c59 100644 --- a/src/gleam/string.gleam +++ b/src/gleam/string.gleam @@ -714,7 +714,7 @@ pub fn to_graphemes(string: String) -> List(String) { |> list.reverse } -pub fn do_to_graphemes(string: String, acc: List(String)) -> List(String) { +fn do_to_graphemes(string: String, acc: List(String)) -> List(String) { case pop_grapheme(string) { Ok(#(grapheme, rest)) -> do_to_graphemes(rest, [grapheme, ..acc]) _ -> acc -- cgit v1.2.3