Closed chshersh closed 6 years ago
I think that non-standard functions should be added to a custom prelude only if there is a really good reason to do so. I don't see a really good reason in this case. Probably this function will be used once per few thousands of LOCs. I agree that in some cases this having function is convenient, but I don't think it should be in prelude.
That being said, I also sorta don't like stuff like one
(but one
is more useful).
@gromakovsky Thanks! This is the exact feedback I want to receive. I find this function useful. But you're right that it won't be used very often and it's not something basic and crucial. I saw several usages of this function across several projects. But when adding new functions we should also consider amount of effort people need to spend to learn new function. And it will be harder for new people to work with projects which use universum
.
log-warper
has useful functionfromScratch
:I think we should add similar family of
(executing|evaluating|using)
function forMonoid
because it's very often pattern when you want to runState
computation starting from empty value. Consider next examples:I propose next naming:
(using|evaluating|executing)Mempty
.For now I see this only usable for
State[T]
. But still very convenient.