Conditional count Conditional count There is another way of using the count() function. Let’s assume that we want to get three numbers for each group: The number of studen...
Matching: the basics Else cases Matching on values Matching on type and value Captures Implicit matching on capabilities in the context of union types Matching tuples Guards...
Example program Test names Aggregation Long tests Exclusion groups Tear down Additional resources PonyTest is Pony’s unit testing framework. It is designed to be as simple ...
An iso specific class A capability generic class In the examples presented previously we’ve explicitly set the reference capability to val : class Foo [ A : Any val ] ...
Consuming a variable Destructive read An important part of Pony’s capabilities is being able to say “I’m done with this thing.” We’ll cover two means of handling this situation:...
Safely converting to a more specific type (casting) Specify the type of items in an array literal The as operator in Pony has two related uses. First, it provides a safe way to...