Gus

Results 276 comments of Gus

If we decide to make `reduce` "unsafe", based on the fact that in FSharp.Core a function exists already with that name and it's unsafe, we should find another name for...

We could, but not without adding (or renaming) the existing safe one. Otherwise we'll be kind of losing functionality. Any suggestion for the other function name ?

I'm not very creative this morning so at the moment I can just propose the name borrowed by Haskell's [fold1](https://hackage.haskell.org/package/ghc-internal-9.1201.0/docs/src/GHC.Internal.Data.Foldable.html#foldl1). However in Haskell that's a non-safe function, but we don't...

> For the renaming, why not just borrow from Haskell, that is [foldl](https://hackage.haskell.org/package/base-4.21.0.0/docs/Prelude.html#v:foldl) for safe reduce and [foldr](https://hackage.haskell.org/package/base-4.21.0.0/docs/Prelude.html#v:foldr) for safe reduceBack. @BurningLutz those names are following a Haskell convention which...

Thanks, I really appreciate your feedback and kind words. > some official APIs need to be converted to proprietary data structures before they can be used in FSharpPlus, I'm not...

> Which reduce did you refer to? Is [this](https://github.com/fsprojects/FSharpPlus/blob/master/src/FSharpPlus/Operators.fs#L721) one? But this one is a [partial function](https://en.wikipedia.org/wiki/Partial_function), it is undefined when the reducible is empty, and a partial function is...

Yes, that's the whole point of this discussion. Any suggestion for the name of the new total function?

> Yes, but the problem is that now that this is the case, any "error correction" done on the current reduce is a breaking change. How is it a breaking...

I see, but here is not possible for the user to add a Reduce member for an array type and make it part of the type-classy-like behavior. It would have...

> Simply adding a non-safe, generic reduce wrapper for seq/list/array that is completely consistent with the behavior of FSharp.Core is the conclusion of this issue. I think at this point...