Implementing lps:reverse.