> From: Oleg Kobchenko <[EMAIL PROTECTED]>
>
> It's a very interesting technique: to mingle multiple
> arguments into u`v/ gerund.
>
> yy=: (+ 2000+0 12&([EMAIL PROTECTED]:))`(+ <:@i.)/
Or
yy=: (+ 2000+12<[EMAIL PROTECTED])`(+ <:@i.)/
> (yy -: yr) 3 4 15
> 1
>
>
> yy 3 4 15
> 2003 2003 2003 2003 2003 2003 2003 2003 2003 2004 2004 2004 2004 2004 2004
>
>
> > From: Raul Miller
>
> >
> > yr=: 2000 + [EMAIL PROTECTED]: {. +/@}. {. +`(0,12 # i.@:>[EMAIL
> > PROTECTED]&(%&12))/
> >
> > (yr -: year) 3 4 15
> > 1
>
>
> > From: Brian Schott
> >
> > With the list's help I have produced a workable
> > routine for the problem. For closure I post here the current
> > script. I had an embarrassingly difficult time crafting the
> > verb "year", btw, but enjoyed the challenge. Thank you for
> > your help.
>
> > yrsmths =: 12 12&#:
> > NB.* year v
> > NB. monad triple: start year after 2000
> > NB. start month (eg. April = 4)
> > NB. number of months
> > NB. year 3 4 15 is start at 2003-April and contain 15 months
> > year =: 2000+{.+({:{.<:@(1&{)|.((12&[EMAIL PROTECTED], 12&#)&>:@{.)& [EMAIL
> > PROTECTED]:)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm