procedure stack ( parameter depth : cardinal; input i : byte; output o : byte; sync pop ) is local variable v : byte begin if depth = 1 then loop select i then v := i | pop then o <- v; v := 0 end end else local channel nextI, nextO : byte sync nextPop begin stack over depth - 1 of nextI, nextO, nextPop || loop select i then nextI <- v; v := i | pop then o <- v; sync nextPop || nextO -> v end end end end end