26 lines
430 B
Text
26 lines
430 B
Text
Inventory Alfa
|
|
For i=0 to 9 {
|
|
Append Alfa, i:=lambda i -> i**2
|
|
}
|
|
For i=0 to 9 {
|
|
Print Alfa(i)()
|
|
}
|
|
|
|
Beta=Stack
|
|
Stack Beta {
|
|
For i=0 to 9 {
|
|
Data lambda i -> i**2
|
|
}
|
|
}
|
|
Def Fun(X)=X()
|
|
\\ reading functions from position 1 to 10
|
|
For i=0 to 9 {
|
|
Print fun(stackitem(Beta,i+1))
|
|
}
|
|
\\ pop functions form stack Beta
|
|
Stack Beta {
|
|
While not empty {
|
|
Read M
|
|
Print M()
|
|
}
|
|
}
|