Queue/Definition: Difference between revisions

No edit summary
Line 842:
}
 
last_itemfirst_item $(lastfirst list)
list $(deleteBy list $(size list)-10)
return last_itemfirst_item
}
 
Line 855:
}
}
</lang>
 
q $(new ~Queue)
 
q.push "one"
q.push "two"
q.push "three"
 
q.inspect
 
print "popped = " + $(q.pop)
print "is it empty? = " + $(q.empty)</lang>
{{out}}
<pre>#{
empty <function: 0x1099B87A0>
inspect <function: 0x1099B8800>
list #(
"one"
"two"
"three"
)
pop <function: 0x1099B8740>
push <function: 0x1099B86E0>
}
popped = three
is it empty? = false</pre>
 
=={{header|AutoHotkey}}==
1,532

edits