Skip to content

Instantly share code, notes, and snippets.

View abeaumont's full-sized avatar

Alfredo Beaumont abeaumont

View GitHub Profile
module: toandfro
define function group
(sequence :: <sequence>,
n :: <integer>)
=> (newseq :: <sequence>)
map(method(i) copy-sequence(sequence, start: n * i, end: n * (i + 1)) end,
range(below: floor/(sequence.size, n)));
end function group;
USING: kernel io.files io.encodings.binary crypto.xor ;
IN: crypt
: crypt ( path key -- str )
[ binary file-contents ] dip xor-crypt ;