funcional-shared stack/queue