Implementation of longest common subsequence in Perl 6