Fix compile error & add extra comment
This commit is contained in:
parent
0247b30479
commit
e7f68a4647
|
@ -10,9 +10,12 @@ primitive ColourList
|
|||
fun apply(): Array[Colour] =>
|
||||
[Red; Green; Blue]
|
||||
|
||||
for colour in ColourList().values() do
|
||||
|
||||
end
|
||||
actor Main
|
||||
new create(env: Env) =>
|
||||
for colour in ColourList().values() do
|
||||
env.out.print("I should be printing a colour
|
||||
but I don't know how to cast to string")
|
||||
end
|
||||
|
||||
// Type aliases can also be used to give simpler names to complex types
|
||||
interface HasName
|
||||
|
|
|
@ -8,6 +8,7 @@ x = ("hi", 3)
|
|||
x = ("bye", 7)
|
||||
|
||||
// Pony supports tuple unpacking but calls it "destructuring"
|
||||
// This assigns "bye" to y and 7 to z
|
||||
(var y, var z) = x
|
||||
|
||||
// You can access the elements of tuples directly using this
|
||||
|
|
Loading…
Reference in New Issue