reversing a list

Matthias matthias.pfeifer@post.rwth-aachen.de
Sat, 15 Jun 2002 20:43:22 +0200


Hi there,

I thought i can reverse a list with reverse a list easily with the
reverse function in order to achieve following: I wanted to check for a
certain suffix (then reversed a prefix) and substitute that. So i did

--      let dstfile = case tmpfile of
--                      ('a':'s':'p':'.':rest)  -> rest ++ ".psx"
--                      anything                -> anything ++ ".psx"

Guess what: I did not work. dstfile was reversed (tmpfile ++ ".psx"). i
guess this deals with lazy evalutation, but would be glad about some
definit ideas.

Matthias