Neil Mitchell wrote:
stackTop ctx =
  let (x:xs) = stack ctx in x
stackTop ctx = head ctx

stackTop ParseContext{stack=x:_} = x

or:

stackTop ctx = head (stack  ctx)

===            stackTop ctx = head . stack $ ctx
===            stackTop = head . stack

Regards, Brian.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to