Reverses the list. If the list is infinite, it will hang forever.
The source list.
The reversed list.
expect(reverse(empty())).toStrictEqual(empty());expect(toArray(reverse(fromArray([1, 4, 2, 3])))).toStrictEqual([3, 2, 4, 1]);expect(toArray(reverse(fromString("hoge")))).toStrictEqual(["e", "g", "o", "h"]); Copy
expect(reverse(empty())).toStrictEqual(empty());expect(toArray(reverse(fromArray([1, 4, 2, 3])))).toStrictEqual([3, 2, 4, 1]);expect(toArray(reverse(fromString("hoge")))).toStrictEqual(["e", "g", "o", "h"]);
Reverses the list. If the list is infinite, it will hang forever.