summaryrefslogtreecommitdiff
path: root/src/Grasp/IP.hs
blob: 7b70e2128607e9946edcdcdc96cae4042fb9e9d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 = (==[])