raku-community-modules / GD

Raku interface to the Gd graphics library.
Artistic License 2.0
2 stars 6 forks source link

Use subsets and or types where appropriate #11

Open jonathanstowe opened 4 years ago

jonathanstowe commented 4 years ago

There are a number of places where parameters to methods have a where constraint that is repeated several times, such as line and rectangle which have:

List :$location (Int $x1 where { $x1 >= 0 }, Int $y1 where { $y1 >= 0 })

This could be a reusable subset, also in these cases there could be an actual Point type with appropriate multis and coercions.