Skip to content

Commit

Permalink
Changed "treats" to "coerces"
Browse files Browse the repository at this point in the history
This addresses @zoffixznet first concern in #1731
  • Loading branch information
JJ committed Jan 25, 2018
1 parent b023a9a commit 61ea388
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/Type/Any.pod6
Expand Up @@ -528,19 +528,21 @@ Defined As:
method flatmap(Any:U: &code --> Seq)
Treats the C<Any> as 1-item list and uses
Coerces the C<Any> to a C<List> by applying the C<.list> method and uses
L«C<List.flatmap>|/type/List#method_flatmap» on it.
say Any.flatmap({.reverse}); # OUTPUT: «((Any))␤»
In the case of C<Any>, C<Any.list> returns a 1-item list, as is shown.
=head2 method roll
Defined As:
multi method roll(--> Any)
multi method roll($n --> Seq)
Treats the C<Any> as 1-item list and uses
Coerces the C<Any> to a C<List> by applying the C<.list> method and uses
L«C<List.roll>|/type/List#routine_roll» on it.
say Any.roll; # OUTPUT: «(Any)␤»
Expand All @@ -553,7 +555,7 @@ Defined As:
multi method pick(--> Any)
multi method pick($n --> Seq)
Treats the C<Any> as 1-item list and uses
Coerces the C<Any> to a C<List> by applying the C<.list> method and uses
L«C<List.pick>|/type/List#routine_pick» on it.
say Any.pick; # OUTPUT: «(Any)␤»
Expand Down Expand Up @@ -867,7 +869,7 @@ Defined As:
method iterator(--> Iterator)
Treats the C<Any> as 1-item list and uses
Coerces the C<Any> to a C<List> by applying the C<.list> method and uses
L«C<iterator>|/type/Iterable#method_iterator» on it.
my $it = Any.iterator;
Expand All @@ -880,7 +882,7 @@ Defined As:
method grep(Mu $matcher, :$k, :$kv, :$p, :$v --> Seq)
Treats the C<Any> as 1-item list and uses
Coerces the C<Any> to a C<List> by applying the C<.list> method and uses
L«C<List.grep>|/type/List#routine_grep» on it.
Based on C<$matcher> value can be either C<((Any))> or empty List.
Expand Down

0 comments on commit 61ea388

Please sign in to comment.