Commit 84183726 authored by Erin van der Veen's avatar Erin van der Veen

Remove unwanted parenthesis

parent c135690a
......@@ -13,11 +13,11 @@ empty a :== case a of
instance length Stack
// Add element to the Stack
push :: a (Stack a) -> (Stack a)
push :: a (Stack a) -> Stack a
// Remove element from the Stack and return it if the Stack is not empty
pop :: (Stack a) -> (Maybe a, Stack a)
// Peek the top of the Stack
peek :: (Stack a) -> (Maybe a)
peek :: (Stack a) -> Maybe a
......@@ -9,13 +9,13 @@ instance length Stack
where
length (Stack a) = length a
push :: a (Stack a) -> (Stack a)
push :: a (Stack a) -> Stack a
push a (Stack as) = Stack [a : as]
pop :: (Stack a) -> (Maybe a, Stack a)
pop (Stack []) = (Nothing, newStack)
pop (Stack [a : as]) = (Just a, Stack as)
peek :: (Stack a) -> (Maybe a)
peek :: (Stack a) -> Maybe a
peek (Stack []) = Nothing
peek (Stack [a : as]) = Just a
peek (Stack [a : _]) = Just a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment