public AList < T > reverse ( ) { AList < T > remaining = this ; AList < T > result = nil ( ) ; while ( ! remaining . isEmpty ( ) ) { result = result . cons ( remaining . head ( ) ) ; remaining = remaining . tail ( ) ; } return result ; }
Returns a copy of this AList with elements in reversed order .