Skip to content

Commit

Permalink
[MMD] give the proto the right arity
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Oct 19, 2009
1 parent dc98ead commit 4fe7f7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/multi-dispatch.pod
Expand Up @@ -248,6 +248,7 @@ narrower than C<Any, Any>. So a possible candidate
would win against C<(::T, T)>.


=head2 Bindability checks

Implicit constraints can be applied through traits:

Expand Down Expand Up @@ -294,7 +295,7 @@ with C<multi sub ...> or C<multi ...>, or you declare once and for all that
the compiler shall view every sub of a given name as a multi candidate. You
can do that by installing a I<proto> routine:

proto to-json { ... } # literal ... here
proto to-json($) { ... } # literal ... here
# automatically a multi
sub to-json(Bool $d) { $d ?? 'true' !! 'false' }

Expand Down

0 comments on commit 4fe7f7b

Please sign in to comment.