[Jprogramming] Fold -- can't get it to work
Xiao-Yong Jin
meta.jxy at gmail.com
Fri Jul 3 01:47:55 UTC 2020
> On Jul 2, 2020, at 3:18 PM, Piet de Jong <pietdion at gmail.com> wrote:
>
> My issue is not with x and y insofar as (u F:. v) is concerned. I agree it makes sense for x to be 'control information/initial condition' and y the ’data’.
>
> My concern is with x and y insofar as v is concerned. Each item in y for the verb (u F:. v) now becomes x for the verb v. So the data items y become x’s from v’s point of view.
It's consistent with the existing primitives.
]F.:(+([[[:echo;)'=';[;'+';]) i.4
┌─┬─┬─┬─┬─┐
│5│=│2│+│3│
└─┴─┴─┴─┴─┘
┌─┬─┬─┬─┬─┐
│6│=│1│+│5│
└─┴─┴─┴─┴─┘
┌─┬─┬─┬─┬─┐
│6│=│0│+│6│
└─┴─┴─┴─┴─┘
6
(+([[[:echo;)'=';[;'+';])/i.4
┌─┬─┬─┬─┬─┐
│5│=│2│+│3│
└─┴─┴─┴─┴─┘
┌─┬─┬─┬─┬─┐
│6│=│1│+│5│
└─┴─┴─┴─┴─┘
┌─┬─┬─┬─┬─┐
│6│=│0│+│6│
└─┴─┴─┴─┴─┘
6
More information about the Programming
mailing list