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] =>
|
fun apply(): Array[Colour] =>
|
||||||
[Red; Green; Blue]
|
[Red; Green; Blue]
|
||||||
|
|
||||||
for colour in ColourList().values() do
|
actor Main
|
||||||
|
new create(env: Env) =>
|
||||||
end
|
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
|
// Type aliases can also be used to give simpler names to complex types
|
||||||
interface HasName
|
interface HasName
|
||||||
|
|
|
@ -8,6 +8,7 @@ x = ("hi", 3)
|
||||||
x = ("bye", 7)
|
x = ("bye", 7)
|
||||||
|
|
||||||
// Pony supports tuple unpacking but calls it "destructuring"
|
// Pony supports tuple unpacking but calls it "destructuring"
|
||||||
|
// This assigns "bye" to y and 7 to z
|
||||||
(var y, var z) = x
|
(var y, var z) = x
|
||||||
|
|
||||||
// You can access the elements of tuples directly using this
|
// You can access the elements of tuples directly using this
|
||||||
|
|
Loading…
Reference in New Issue
Block a user