fxdmhtt

Results 13 comments of fxdmhtt

I think the idea of ​​implementing tryReduce is questionable. 1. This is a self-made name that does not exist anywhere else (as far as I know), which may cause ambiguity,...

Can we ignore "safety" for now and add the reduce paradigm function of seq/array/list in the current version? The current reduce function cannot work on these three types, but these...

> 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. This will lead to breaking updates and affect compatibility....

I also think that naming should first consider the consistent meaning in the F# context, and then borrow the conventions of Haskell.

Hahahaha, I don't have the ability to find any "fundamental issues", I fully believe in your ability. I just think that some official APIs need to be converted to proprietary...

> Now I have no idea what's the problem here. Is it the problem that currently there is no `Reduce` static members defined for builtin collections like list/array/seq inside [Foldable](https://github.com/fsprojects/FSharpPlus/blob/master/src/FSharpPlus/Control/Foldable.fs)?...

> > I mean it won't compile, which makes it a total function. Currently there's no way it will throw an exception at runtime. > > Ok, I think I...

> Yes, that's the whole point of this discussion. Any suggestion for the name of the new total function? My personal suggestion is to make a breaking change. Even so,...

> 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...