diff options
-rw-r--r-- | Library/Stack.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Stack.hs b/Library/Stack.hs index 29dd17c..99cd8e1 100644 --- a/Library/Stack.hs +++ b/Library/Stack.hs @@ -4,7 +4,8 @@ module Library.Stack ( at, pop, (<:>), - size + size, + diff ) where @@ -42,3 +43,8 @@ x <:> (Stack list) = Stack (x : list) size :: Stack a -> Int size (Stack list) = length list + + +diff :: (Eq a) => Stack a -> Stack a -> Stack a +diff (Stack one) (Stack two) = Stack (one \\ two) + |