Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
26
Task/Queue-Definition/Klingphix/queue-definition.klingphix
Normal file
26
Task/Queue-Definition/Klingphix/queue-definition.klingphix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ include ..\Utilitys.tlhy }
|
||||
"..\Utilitys.tlhy" load
|
||||
|
||||
|
||||
:push! { l i -- l&i }
|
||||
0 put
|
||||
;
|
||||
|
||||
:empty? { l -- flag }
|
||||
len not { 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue