Queue/Definition: Difference between revisions

m (added whitespace, aligned the comments.)
Line 3,121:
in pop! at none:2
</pre>
 
=={{header|Klingphix}}==
<lang Klingphix>{ include ..\Utilitys.tlhy }
"..\Utilitys.tlhy" load
 
:push! { l i -- l&i }
0 put
;
:empty? { l -- flag }
len 0 equal
;
:pop! { l -- l-1 }
empty? (
["Empty"]
[pop swap]
) if
;
( ) { empty queue }
1 push! 2 push! 3 push!
pop! ? pop! ? pop! ? pop! ?
 
"End " input</lang>
{{out}}
<pre>1
2
3
Empty
End</pre>
 
=={{header|Kotlin}}==
672

edits