[Jprogramming] A q for starters - composing without forking (% +/ %)
Raul Miller
rauldmiller at gmail.com
Fri Feb 5 07:23:14 HKT 2010
On Thu, Feb 4, 2010 at 5:56 PM, Alex Gian <alexgian at blueyonder.co.uk> wrote:
> similar construct before. E.g. I can't intuitively see why Ric's
> suggestion ( [: % [: +/ % ) isn't ( [: % [: +/ [: % ), guess I'll just
> have to rtfm.
>
>
Because [: needs to be in an odd position (counting from the right).
The even positions are combining verbs.
When [: is in an odd position it means that the verb to its right
is being used without a left argument, instead of its "two
argument" meaning.
If [: were in an even position that would mean that you do
not want any calculations to take place (that would be
a guaranteed error condition).
--
Raul
More information about the Programming
mailing list