Skip to content

Commit 82f7e01

Browse files
authored
Expand allomorph glossary
- Explain more what "two values" means - Mention that Setties and Baggies care about object identity
1 parent 15aff17 commit 82f7e01

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/Language/glossary.pod6

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,14 @@ Also see L<#Adverb> and L<#Colon Pair and Colon List>.
7272
X<|Allomorph>
7373
7474
A type that has two related values which may be used depending on the
75-
context. The I<allomorph> types L<IntStr|/type/IntStr>, L<NumStr|/type/NumStr>,
75+
context. For example L<IntStr|/type/IntStr> allomorph C<is> both
76+
an L<Int|/type/Int> and a L<Str|/type/Str>, so it will be accepted by
77+
anything that expects an C<Int>, a C<Str>, or an C<IntStr>. Keep in mind
78+
that certain constructs, such as L<sets, bags, and mixes|/language/setbagmix>
79+
care about object identity, and so will not accept an allomorph as equivalent
80+
of its components alone.
81+
82+
The I<allomorph> types L<IntStr|/type/IntStr>, L<NumStr|/type/NumStr>,
7683
L<RatStr|/type/RatStr> and L<ComplexStr|/type/ComplexStr> may be created
7784
as a result of parsing a quoted string:
7885

0 commit comments

Comments
 (0)