From 4942ac97ff67c97c0673b8131244e78ae35a341e Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 13 Jul 2023 14:38:46 +0100 Subject: Add deprecated version --- src/gleam/list.gleam | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit v1.2.3