pack :: Int -> Int -> GMState -> GMState
pack t n state
    = putHeap heap' (putStack (addr: drop n s) state)
    where 
        s = getStack state
        (heap', addr) = hAlloc (getHeap state) (NConstr t (take n s))
pack :: Int -> Int -> GMState -> GMState
pack t n state
    = putHeap heap' (putStack (addr: drop n s) state)
    where 
        s = getStack state
        (heap', addr) = hAlloc (getHeap state) (NConstr t (take n s))
pack t n state
    = putHeap heap' (putStack (addr: drop n s) state)
    where 
        s = getStack state
        (heap', addr) = hAlloc (getHeap state) (NConstr t (take n s))