Skip to content

Commit

Permalink
Merge branch 'main' into code-samples-extended-to-be-runnable
Browse files Browse the repository at this point in the history
  • Loading branch information
shaedrich authored May 21, 2024
2 parents b59449e + caae6e2 commit 896f8cd
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions code-samples/classes-wombat-constructor-invocation.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
let defaultWombat = Wombat("Fantastibat") // Invokes the create method by default
let hungryWombat = Wombat.hungry("Nomsbat", 12) // Invokes the hungry method
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Forest
let _owl: Owl = Owl
let _hawk: Hawk = Hawk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
interface Color
2 changes: 1 addition & 1 deletion code-samples/type-aliases-enumerations-apply.pony
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ type Colour is (Red | Blue | Green)

primitive ColourList
fun apply(): Array[Colour] =>
[Red; Green; Blue]
[Red; Green; Blue]
7 changes: 7 additions & 0 deletions code-samples/type-aliases-enumerations-iteration.pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
primitive ColourList
fun apply(): Array[Colour] =>
[Red; Green; Blue]

for colour in ColourList().values() do
env.out.print(colour().string())
end
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ theme:
features:
- content.code.copy
- content.code.select
- navigation.footer
- navigation.instant
- navigation.indexes
- navigation.tracking
Expand Down

0 comments on commit 896f8cd

Please sign in to comment.