RosettaCodeData/Task/Collections/Lingo/collections.lingo

14 lines
200 B
Plaintext

-- list stuff
l = [1, 2]
l.add(3)
l.add(4)
put l
-- [1, 2, 3, 4]
-- property list stuff
pl = [#foo: 1, #bar: 2]
pl[#foobar] = 3
pl["barfoo"] = 4
put pl
-- [#foo: 1, #bar: 2, #foobar: 3, "barfoo": 4]