RosettaCodeData/Task/Collections/Zkl/collections.zkl

11 lines
459 B
Plaintext

Lists: L(1,2,3).append(4); //-->L(1,2,3,4), mutable list
Read only list: ROList(1,2,3).append(4); // creates two lists
Bit bucket: Data(0,Int,1,2,3) // three bytes
The "Int" means treat contents as a byte stream
Data(0,Int,"foo ","bar") //-->7 bytes
Data(0,Int,"foo ").append("bar") //ditto
Data(0,Int,"foo\n","bar").readln() //-->"foo\n"
Data(0,String,"foo ","bar") //-->9 bytes (2 \0s)
Data(0,String,"foo ").append("bar").readln() //-->"foo "