[Factor-talk] cleave combinator

2014-08-26 Thread mr wzrd
Hello list. How would one use the cleave combinator to accumulate results into a sequence instead of onto the stack? Initially I have one object on the stack and five quotations to apply to it. Makes sense to define a 5array operation? Still, there should be a general way to get the results

Re: [Factor-talk] cleave combinator

2014-08-26 Thread Doug Coleman
You can use outputarray in combinators.smart. On Aug 26, 2014 8:09 PM, mr wzrd wzr...@gmail.com wrote: Hello list. How would one use the cleave combinator to accumulate results into a sequence instead of onto the stack? Initially I have one object on the stack and five quotations to apply

Re: [Factor-talk] cleave combinator

2014-08-26 Thread Doug Coleman
That's not the problem. It shouldn't care what types are going to be in the array. Try a simpler example first, or experiment with { } outputsequence. On Aug 26, 2014 8:30 PM, mr wzrd wzr...@gmail.com wrote: outputarray does not seem to like the fact that the objects on the stack are arrays.

Re: [Factor-talk] cleave combinator

2014-08-26 Thread mr wzrd
Generic word call does not define a method for the array class. Dispatching on object: { asdf } On Tue, Aug 26, 2014 at 11:56 PM, Doug Coleman doug.cole...@gmail.com wrote: That's not the problem. It shouldn't care what types are going to be in the array. Try a simpler example first, or

Re: [Factor-talk] cleave combinator

2014-08-26 Thread mr wzrd
Er, I am daft. Ignored the fact that outputarray expects a quotation. Sometimes it just takes a short break from the keyboard to regain the senses. On Wed, Aug 27, 2014 at 12:05 AM, Doug Coleman doug.cole...@gmail.com wrote: Check out the unit tests and pattern it after that or paste the code.

Re: [Factor-talk] cleave combinator

2014-08-26 Thread mr wzrd
Sometimes it just takes a short break from the keyboard to let the stupidity evaporate. On Wed, Aug 27, 2014 at 1:13 AM, mr wzrd wzr...@gmail.com wrote: Er, I am daft. Ignored the fact that outputarray expects a quotation. Sometimes it just takes a short break from the keyboard to regain the