next node: SeqOfSeq,
prev node: SeqSort,
up to node: Subsystem Sequences Proper


SeqZip

Signature of SeqZip

List of Import References :
See BOOL
See DENOTATION
See Nat
See Option
See Seq

SIGNATURE SeqZip [from1,from2,to]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

-- zip sequences

IMPORT Seq[from1] ONLY seq
       Seq[from2] ONLY seq
       Seq[to]    ONLY seq

SORT from1 from2 to

FUN zip :(from1**from2->to)->seq[from1]**seq[from2]->seq[to]
        -- zip (compose) (s1, s2)
        -- zip the sequences s1, s2 of same length by compose
        -- informally:
        -- zip (compose) (<a1, ..., an>, <b1, ..., bn>) 
        --		== <a1 compose b1, ..., an compose bn>

FUN unzip :(to->from1**from2)->seq[to]->seq[from1]**seq[from2]
        -- unzip (split) (s)
        -- unzip a sequence s by split in two of the same length
        -- informally:
        --   compose (split) == identity => 
        -- 	unzip (split) (< a1 compose b1, ..., an compose bn >)
        --	== (<a1, ..., an>, <b1, ..., bn>)


next node: SeqOfSeq,
prev node: SeqSort,
up to node: Subsystem Sequences Proper