Short answer: there is no efficient way (and I find this to be a huge
problem).

The most recent thread on this topic is here:
http://jsoftware.com/pipermail/programming/2015-February/041005.html

Marshall

On Tue, Jun 23, 2015 at 01:53:36AM +0000, Marshall Bockrath-Vandegrift wrote:
> Hi all,
> 
> I'm still in the process of learning J, and trying to adapt ideas from
> other languages.  In many (other?) functional programming languages it is
> possible to reduce over a collection starting with a provided initial value
> which does not belong to the reduced collection.  To attempt to put this in
> J terms, such an operation would allow the initial value and result of each
> reduction step to have a different shape than that of the the items of the
> value being reduced. As far as I can tell, the standard `/` adverb provides
> no such facility. Is there a J idiom for this?
> 
> Thanks,
> 
> -Marshall
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to