We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3972d84 commit a108983Copy full SHA for a108983
src/gleam/list.gleam
@@ -701,15 +701,17 @@ pub fn prepend(to list: List(a), this item: a) -> List(a) {
701
702
/// Joins a list of lists into a single list.
703
///
704
-/// This function traverses all elements twice.
705
-///
+/// This function traverses all elements twice on the Javascript target.
+/// This function traverses all elements once on the Erlang target.
706
+///
707
/// ## Examples
708
709
/// ```gleam
710
/// flatten([[1], [2, 3], []])
711
/// // -> [1, 2, 3]
712
/// ```
713
714
+@external(erlang, "lists", "append")
715
pub fn flatten(lists: List(List(a))) -> List(a) {
716
flatten_loop(lists, [])
717
}
0 commit comments