-
-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathStackMain.hs
More file actions
19 lines (15 loc) · 640 Bytes
/
StackMain.hs
File metadata and controls
19 lines (15 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-|
Created by: Ramy-Badr-Ahmed (https://github.com/Ramy-Badr-Ahmed) in Pull Request: #54
https://github.com/TheAlgorithms/Haskell/pull/54
Please mention me (@Ramy-Badr-Ahmed) in any issue or pull request addressing bugs/corrections to this file.
Thank you!
-}
module DataStructures.StackMain where
import DataStructures.Stack
main :: IO ()
main = do
let input = [1, 2, 3, 4, 5]
let (result, emptyBefore, emptyAfter) = testStack input
print result -- Expected output: [Just 5, Just 4, Just 3, Just 2, Just 1]
print emptyBefore -- Expected output: False
print emptyAfter -- Expected output: True