>>>>> "xander" == xander <[EMAIL PROTECTED]> writes:
xander> Hi again,
xander> With our new knowledge of snoc (thanks!) we try to build ourself one
xander> operator:
xander> (<*>) :: [a] -> a -> [a]
xander> xs <*> x = xs ++ [x]
xander> But, why can't I do something like this:
xander> prev (ListElem (xs<*>x,ys)) = ListElem (xs, x:ys)
You're trying to match on a function. This is not possible in
Haskell. You can only match on constructors. So if you use the type
'Tsil' which I mentioned in a previous mail you could match
prev (ListElem (xs `Snoc` x, ys)) = ListElem (xs, x:ys)
xander> It works ok with (:) ..
(:) is a constructor.
Marko
--
Marko Schütz [EMAIL PROTECTED]
http://www.ki.informatik.uni-frankfurt.de/~marko/