I'm struggling to define a lambda to work over n-wise reduce. I'm looking to have a window of 3 elements which reduces over an input array and return the minimum of (left - middle),(right-middle). Something like 3{(⍺-⊃⍵)⌊((⊃⌽⍵)-⊃⍵)}/0,a,0
I can't seem to figure out how to work with n-wise reduce with 3 elements.
I can't seem to figure out how to work with n-wise reduce with 3 elements.