Computes a string displaying the contents of the list aList. This function is curried, takes a printing function for the values as first parameter, and then returns a function taking the list to display.
aList
a function that displays a single element
a function displaying a list
listToString()(cons(1, cons(2, nil))) // -> "(|1, 2|)"listToString((x) => ".".repeat(x))(cons(1, cons(2, nil))) // -> "(|., ..|)" Copy
listToString()(cons(1, cons(2, nil))) // -> "(|1, 2|)"listToString((x) => ".".repeat(x))(cons(1, cons(2, nil))) // -> "(|., ..|)"
Computes a string displaying the contents of the list
aList
. This function is curried, takes a printing function for the values as first parameter, and then returns a function taking the list to display.