Module list.functional.utils

This file implements some helper functions on the functional lists.

Here are some ways to use these functions :

import { anyToString } from "#src/utils/printers.js";
import { cons, nil, listIota } from "#src/utils/list.functional.api.js";
import { arrayToList, listReverse, listEquals } from "#src/utils/list.functional.utils.js";

const aList = listIota(0, 4);
anyToString(listReverse(aList)); // -> (|3, 2, 1, 0|)
listEquals()(aList, arrayToList([0, 1, 2, 3])); // -> true
listEquals()(aList, cons(1, cons(1, cons(2, cons(3, nil))))); // -> false

Index

Functions