summaryrefslogtreecommitdiff
path: root/src/Grasp/IP.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Grasp/IP.hs')
-rw-r--r--src/Grasp/IP.hs36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Grasp/IP.hs b/src/Grasp/IP.hs
new file mode 100644
index 0000000..7b70e21
--- /dev/null
+++ b/src/Grasp/IP.hs
@@ -0,0 +1,36 @@
+module Grasp.IP (
+ IP,
+
+ singleton,
+ peek,
+ push,
+ pop,
+ isEmpty
+ ) where
+
+
+
+import Grasp.Node( GNode )
+import qualified Grasp.Node as GN
+
+
+
+type IP = [GNode]
+
+
+
+singleton :: GNode -> IP
+singleton = (:[])
+
+peek :: IP -> GNode
+peek = head
+
+push :: GNode -> IP -> IP
+push = (:)
+
+pop :: IP -> IP
+pop = tail
+
+isEmpty :: IP -> Bool
+isEmpty = (==[])
+