>>>>> "xander" == xander  <[EMAIL PROTECTED]> writes:

xander> is there an opposite (:) available in haskell?
xander> like, i can toss an element at the back of a list without
xander> O(n) fuss recursing bla??

xander> The (:) operator is internally, isn't it? So why not make life easier
xander> and create (hack) an opposite of it?

Do you mean sth like

> data Tsil a = Lin | Snoc (Tsil a) a

> lastTsil :: Tsil a -> a
> lastTsil (Snoc xs x) = x
> lastTsil Lin = error "lastTsil: empty Tsil"


Marko

-- 
Marko Schütz            [EMAIL PROTECTED]
http://www.ki.informatik.uni-frankfurt.de/~marko/


Reply via email to