···2727//// [from_yielder](#from_yielder "Consume any yielder to build an array"),
2828//// [initialise](#initialise "Use a constructor function for every element") \
2929//// [to_list](#to_list "Convert to a list"),
3030-//// [to_yielder](#to_yielder "Create a yielder iterating through the array")
3030+//// [to_yielder](#to_yielder "Create a yielder iterating through the array"),
3131+//// [join](#join "Convert a string array to a string")
3132////
3233//// #### Query
3334//// [is_empty](#is_empty "Is the array empty?"),
···354355 case array {
355356 Empty -> yielder.empty()
356357 Array(root:, ..) -> yielder.unfold(iterator_new(root), iterator_next)
358358+ }
359359+}
360360+361361+/// Convert a string array to a single string by joining the items together
362362+/// using the given separator.
363363+///
364364+/// ```gleam
365365+/// from_list(["trans", "rights", "are", "human", "rights"])
366366+/// |> join(with: " ")
367367+/// // --> "trans rights are human rights"
368368+/// ```
369369+///
370370+/// <div style="text-align: right;">
371371+/// <a href="#">
372372+/// <small>Back to top ↑</small>
373373+/// </a>
374374+/// </div>
375375+pub fn join(strings: Array(String), with separator: String) -> String {
376376+ case first(strings) {
377377+ Error(_) -> ""
378378+ Ok(first) -> {
379379+ use result, string <- fold(drop_first(strings, 1), first)
380380+ result <> separator <> string
381381+ }
357382 }
358383}
359384···13601385///
13611386/// This is useful in tail-recursive algorithms to first build-up a intermediary
13621387/// list instead of appending all elements immediately.
13631363-///
13881388+///
13641389/// This function runs in _O(n)_ time, only depending on the size of the appended list.
13651390///
13661391/// ```gleam