On Wed Dec 24 09:45:58 2008, dwh...@nvidia.com wrote: > Demonstrated by this test: > > <dwhip> rakudo: .say for <A B>.map: { [ .split("") ] } > <p6eval<irc://freenode/p6eval,isnick>> rakudo 34338: > OUTPUT«AB» > <dwhipp> rakudo: .say for <A>.map: { [ .split("") ] } > <p6eval<irc://freenode/p6eval,isnick>> rakudo 34338: OUTPUT«Method > 'iterator' not found for invocant of class 'Str'current instr.: > 'parrot;Any;map' pc 9625 (src/builtins/any-list.pir:228)»
Note that angle brackets don't always form a List -- from S02: "But note that under the parenthesis-rewrite rule, a single value will still act like a scalar value. These are all the same: $a = < a >; $a = ('a'); $a = 'a'; So, <A> is really a Str (not a List), and Rakudo complains that there's no .map method on Str. I've gone ahead and adjusted things so that an iterator on a scalar such as Str/Int/Num treats the scalar as a list of one element. Closing ticket, Pm