I dont think the specification regarding 'reverse' has ever changed.
'flip' has more uses than just for strings. For example, it flips the
key/value in a pair. Hence,
my %h = <a b c d> Z 1,2,3,4; # a neat way of specifying a hash in terms
of two lists
say (map { .flip }, %h).perl; # the .perl gives you more information
about the structure of the result.
# ("3\tc", "1\ta", "2\tb", "4\td")
On 06/18/2010 09:36 AM, Hongwen Qiu wrote:
于 2010年06月18日 13:32, Xi Yang 写道:
Thanks!So the API has changed permanently?
I think so. The "reverse" is for arrays, and "flip" is for Strings.