Queue/Usage: Difference between revisions

add Tcl
(Added C# example)
(add Tcl)
Line 292:
# Queue.is_empty q;;
- : bool = true</lang>
 
=={{header|Tcl}}==
See [[FIFO#Tcl]]
<lang tcl>set Q [list]
empty Q ;# ==> 1 (true)
push Q foo
empty Q ;# ==> 0 (false)
push Q bar
peek Q ;# ==> foo
pop Q ;# ==> foo
peek Q ;# ==> bar</lang>
Anonymous user