The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use Cipher;
class Cipher::Stream is Cipher;

# Things they need to implement.
method generate_keystream(Int $n) returns Array {...}

# Things we implement for them.
method _cipher(Array $data) returns Array {
    return ($data >>+^<< *.generate_keystream($data.elems));
}