Re: a component with * inputs

/ Innovimax SARL <innovimax@gmail.com> was heard to say:
| When I was re reading the answer of Norm to my demand for a
| p:equal-sequence (which was do-it-with-for-each !), I suddently see
| that we cannot do that efficiently in for-each
| And moreover that's a task that is useful
|
| I propose to add a p:pack (not so sure about the name)
|
| <p:declare-step type="p:pack">
|      <p:input port="*" sequence="yes"/>
|      <p:output port="result" sequence="yes"/>
|      <p:option name="wrapper" required="yes"/>
| </p:declare-step>
|
| What it does is simple
|
| It takes p sequence (seq_1,....seq_p) of respective length (len_1, ....len_p)
|
| It outputs a sequence of length max(len_1, ...len_p)
| and for each position of doc of the result sequence
| we have
| result_1 (wrap(seq_1(i), .....seq_p(i))
|
| Where seq_k(i) is non empty if k <= len_k
|
| I was thinking to give a special component that can distribute
| multiple flows at the same time, but the fact is that we that
| component and for-each, you can do it as efficiently
|
| I ask it for beeing a required step (since it's not difficult to implement)

Can you give an example? I'm afraid I can't quite figure out what this
step does.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Two starving men cannot be twice as
http://nwalsh.com/            | hungry as one; but two rascals can be
                              | ten times as vicious as one.--George
                              | Bernard Shaw

Received on Wednesday, 1 August 2007 15:08:01 UTC