• Joins the sep separator among the elements of list.

    Type Parameters

    • T

    Parameters

    • sep: T

      The separator element.

    Returns ((list) => List<T>)

    The joined list.

    Examples

    import { empty, fromString, intersperse, toString } from "./list.ts";
    import { assertEquals } from "../deps.ts";

    assertEquals(intersperse(0)(empty()), empty());

    assertEquals(toString(intersperse(" ")(fromString("hoge"))), "h o g e");

Generated using TypeDoc