(self: List<A>)
| 867 | * @category elements |
| 868 | */ |
| 869 | export const reverse = <A>(self: List<A>): List<A> => { |
| 870 | let result = empty<A>() |
| 871 | let these = self |
| 872 | while (!isNil(these)) { |
| 873 | result = prepend(result, these.head) |
| 874 | these = these.tail |
| 875 | } |
| 876 | return result |
| 877 | } |
| 878 | |
| 879 | /** |
| 880 | * Splits the specified list into two lists at the specified index. |
no test coverage detected