Closed xavierguihot closed 6 years ago
That's a useful method, anything to get rid of case other => other
. 'update' conflicts with AnyPimps.update, but I favour using AnyPimps.tap anyhow. I'll merge it for now and see how it goes, worse case scenario it can be renamed, I've called it 'updatePF' and 'transform' before.
Hello,
I'm used to have the following version of updateIf, which takes a PartialFunction as parameter:
which translates into:
Hope that makes sens as part of your pimps.
Not sure about the naming as
update
is kind of very generic. I sometimes called itpartialMap
, butupdate
is shorter.