Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 7d9c16311e
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (15 sloc) 0.314 kB
#!/usr/bin/env perl6
use v6;
sub decode(@list)
{
gather for @list -> $e
{
$e !~~ Array ?? take($e) !! take($e[1] xx $e[0])
}
}
say decode(([5, "a"], [2, "b"], "c", "b", "d", [2, "e"]).list).perl;
=begin pod
=head1 NAME
P12 - Decode modified run-length encoding.
=end pod
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.