Skip to content

Commit de113b3

Browse files
author
Jan-Olof Hendig
committed
Updated the text about multi-dispatch.
Closes #858
1 parent f441ed3 commit de113b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/Language/functions.pod6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ You declare each candidate with the C<multi> declarator:
212212
congratulate 'Larry'; # OUTPUT: «Happy birthday, Larry␤»
213213
congratulate 'Bob', 45; # OUTPUT: «Happy 45th birthday, Bob␤»
214214
215-
Dispatch can happen on the number of arguments (the L<arity|/type/Routine#(Code)_method_arity>), but also on the
216-
type:
215+
Dispatch can happen on the number of arguments (the L<arity|/type/Routine#(Code)_method_arity>), the
216+
type of arguments but also on additional assertions which can be placed on them. For more information
217+
about type constraints see the documentation for the L<Signature|/type/Signature#Type_Constraints>
218+
class.
217219
218220
multi as-json(Bool $d) { $d ?? 'true' !! 'false'; }
219221
multi as-json(Real $d) { ~$d }

0 commit comments

Comments
 (0)