Paste: testcase

Author: slava
Mode: factor
Date: Tue, 22 Sep 2009 04:03:54
Plain Text |
TUPLE: myseq { underlying1 byte-array read-only } { underlying2 byte-array read-only } ;

T{ myseq f B{ 1 0 0 0 } B{ 1 0 0 0 } } [
    { myseq } declare
    [ 0 2 ] dip dup
    [
        [
            over 1 < [ underlying1>> ] [ [ 1 - ] dip underlying2>> ] if
            swap 4 * >fixnum alien-signed-4
        ] bi-curry@ bi * +
    ] 2curry each-integer
] compile-call .

New Annotation

Summary:
Author:
Mode:
Body: