diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-12-06 20:48:46 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-12-06 20:48:46 +1100 |
commit | 60befe389b3a38f99ef560b74659bddd57bddd1c (patch) | |
tree | d30868f7227e27a026c2872bd41228cf867e0de5 /src/Grasp/Types/IP.hs | |
parent | b7c93bf60c350af983e44d5ee778fd459fa60e97 (diff) |
Added garbage collection
Diffstat (limited to 'src/Grasp/Types/IP.hs')
-rw-r--r-- | src/Grasp/Types/IP.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Grasp/Types/IP.hs b/src/Grasp/Types/IP.hs index c7d3e4b..a548cc3 100644 --- a/src/Grasp/Types/IP.hs +++ b/src/Grasp/Types/IP.hs @@ -7,7 +7,9 @@ module Grasp.Types.IP ( peek, push, pop, - shift + shift, + + toList ) where @@ -45,3 +47,6 @@ pop (IP p) = if (length p == 0) then empty else IP (tail p) shift :: GNode -> IP -> IP shift n (IP p) = if (length p == 0) then empty else IP (n:(tail p)) +toList :: IP -> [GNode] +toList (IP p) = p + |