mkAp :: GMState -> GMState
mkAp state
    = putHeap heap' (putStack (a:as) state)
    where
    (heap', a) = hAlloc (getHeap state) (NAp a1 a2)
    (a1:a2:as) = getStack state 
mkAp :: GMState -> GMState
mkAp state
    = putHeap heap' (putStack (a:as) state)
    where
    (heap', a) = hAlloc (getHeap state) (NAp a1 a2)
    (a1:a2:as) = getStack state 
mkAp state
    = putHeap heap' (putStack (a:as) state)
    where
    (heap', a) = hAlloc (getHeap state) (NAp a1 a2)
    (a1:a2:as) = getStack state 