fun rev1(L) = if L = nil then nil else rev1(tl(L)) @ [hd(L)]; fun rev2(nil) = nil | rev2(x::xs) = rev2(xs) @ [x]