Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/SSlibE2PP/     Datei vom 13.4.2020 mit Größe 485 B image not shown  

SSL Queue.vdmpp   Interaktion und
PortierbarkeitVDM

 

class Queue

functions
static public empty[@T] : () -> seq of @T
empty() == [];

static public isEmpty[@T] : seq of @T -> bool
isEmpty(s) == s = [];
 
static public enQueue[@T] : @T * seq of @T -> seq of @T
enQueue(anElem, aQueue) == aQueue ^ [anElem];

static public deQueue[@T] : seq of @T -> seq of @T
deQueue(aQueue) == 
 if aQueue = [] then
  []
 else
  tl aQueue;

static public top[@T] : seq of @T -> [@T]
top(aQueue) == 
 if aQueue = [] then
  nil
 else
  hd aQueue;

end Queue

Messung
CHZG
1009310097

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.25Angebot  ¤

*Eine klare Vorstellung vom Zielzustand