Maybe we need an example showing this.
Consider a reimplementation of (<x) { y using folds.
The items of x are control to each successive selection.
y are the data and may well be much larger than x.
Who would want x and y swapped with respect to {?

Am 23.02.21 um 21:36 schrieb Hauke Rehr:
> At first, I wanted to state strong disagreement.
> But wait.
> I still do think the order is counterintuitive,
> but now I think the way it’s defined is  actually
> better in terms of 'data' vs 'control'.
> 
> Let me explain:
> 
> Folds are a variation on /
> There’s not much more to it.
> The main advantage is: x doesn’t need to have the same
> type/shape as an item of y
> So a better example would show this.
> 
> Say v takes an A-structure on the right and a B-structure
> on the left. In a fold (x1 v (x2 v (x3 v (x4 v y)))) we
> need x v y to return a B-structure.
> But that looks more like those B-structures are data
> and the A-structures control their being transformed by v
> which is consistent with x to the left and y to the right
> /and/ with the array processed item-by-item becoming this
> very x and the initial value becoming y.
> 
> So if at all, we’d need to spell the example
> 1 2 3 4 ] F:. see_arg 7
> and have F:. work that way – which it does if you
> introduce some ~
> 1 2 3 4 (] F:. see_arg~)~ 7
> (I hope that’s correct – these swappings are a bit confusing)
> 
> I don’t think /that one/ will get much applause.
> (I’d say let’s do it – but I don’t expect many to agree)
> 
> Counterintuitive, but for a good reason.
> 
> Am 23.02.21 um 21:01 schrieb Henry Rich:
>> x is a 'control' input to the fold.
>>
>> Each item of y (and x if given) is a 'data' input to v.
>>
>> There's an end on't!
>>
>> Henry rich
>>
>>
> 

-- 
----------------------
mail written using NEO
neo-layout.org

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to