[Jprogramming] Dyadic use of agenda for monadic verbs

Raul Miller rauldmiller at gmail.com
Sat Sep 29 05:49:21 HKT 2007


On 9/28/07, Martin Pelletier <mp at infodev.ca> wrote:
> If there is something simpler, better, and/or susceptible to be faster,
> I will gladly take suggestions.

For this kind of thing, I like using
  apply=:4 :'x`:6 y'"_1

For example:
   (+:`*: {~ 'ds'i.'dddssds') apply 1 2 3 4 5 6 7
2 4 6 16 25 12 49

Rephrasing that as a verb:
   'dddssds' ((+:`*: {~ 'ds'i.[) apply ]) 1 2 3 4 5 6 7
2 4 6 16 25 12 49

-- 
Raul


More information about the Programming mailing list