aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2023-07-13 14:38:46 +0100
committerLouis Pilfold <louis@lpil.uk>2023-07-13 14:38:46 +0100
commit4942ac97ff67c97c0673b8131244e78ae35a341e (patch)
treea5b48e451a0558d46debc3690ed19e6f9f5d9f46 /src
parent55e7b16fefdcc477719dda3e606828e154c35bdf (diff)
downloadgleam_stdlib-4942ac97ff67c97c0673b8131244e78ae35a341e.tar.gz
gleam_stdlib-4942ac97ff67c97c0673b8131244e78ae35a341e.zip
Add deprecated version
Diffstat (limited to 'src')
-rw-r--r--src/gleam/list.gleam6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index ed1d718..75a66ef 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -683,6 +683,12 @@ pub fn concat(lists: List(List(a))) -> List(a) {
do_concat(lists, [])
}
+// TODO: Add deprecation attribute and then remove later.
+/// This function is deprecated, see `concat` instead.
+pub fn flatten(lists: List(List(a))) -> List(a) {
+ do_concat(lists, [])
+}
+
/// Maps the list with the given function into a list of lists, and then flattens it.
///
/// ## Examples