aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Rothuis <alex.rothuis@gmail.com>2022-10-28 17:39:20 +0200
committerLouis Pilfold <louis@lpil.uk>2022-10-29 10:29:33 +0100
commitd6dd21f173fac9919e818db7761a29ed99f17d5d (patch)
tree28182177e69552010faeec6089e54e1a8f472816 /src
parent1cd95fb58fcddb3bc27e8f8dfeca8d898fbc1806 (diff)
downloadgleam_stdlib-d6dd21f173fac9919e818db7761a29ed99f17d5d.tar.gz
gleam_stdlib-d6dd21f173fac9919e818db7761a29ed99f17d5d.zip
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).
Diffstat (limited to 'src')
-rw-r--r--src/gleam/string.gleam2
1 files changed, 1 insertions, 1 deletions
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