RosettaCodeData/Task/Queue-Definition/Oforth/queue-definition.fth

7 lines
201 B
Forth
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
Object Class new: Queue(mutable l)
Queue method: initialize ListBuffer new := l ;
Queue method: empty @l isEmpty ;
Queue method: push @l add ;
Queue method: pop @l removeFirst ;