You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These functions can already be easily implemented with functions at hand. I like the idea of folding over slices, so I'll probably add a more general version in next release, plus the other ones you requested, but for now you can just use that:
ifoldMonoOuter
:: (OuterSlicerixe, Monoidm, Sizerixe) =>
(Int->Eltrixe->m) ->Arrayrixe->m
ifoldMonoOuter f arr = foldMono g $ range (getComp arr) 0 (headDim (size arr))
where
g i = f i (arr !> i)
Which seems to be doing what you want, right?
λ> a = makeArrayR USeq (2:.3) (toLinearIndex (2:.3))
λ> ifoldMonoOuter (\i s -> [(i, s)]) a
[(0,(ArrayMSeq (3)
[ 0,1,2 ])),(1,(ArrayMSeq (3)
[ 3,4,5 ]))]
By this, I mean functions with signatures like:
This would be very convenient for the work I'm trying to do at the moment.
The text was updated successfully, but these errors were encountered: