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
While silently discarding an arbitrary B is convenient for ergonomics, it may be desirable to call attention to the fact you are discarding a result by requiring that B =:= Unit and thus forcing the user to call .void if their function does not return F[Unit].
flatTap
is defined as:https://github.com/typelevel/cats/blob/fbad4be326cb1a244bfae14db43e06cc486aa602/core/src/main/scala/cats/FlatMap.scala#L172-L173
While silently discarding an arbitrary
B
is convenient for ergonomics, it may be desirable to call attention to the fact you are discarding a result by requiring thatB =:= Unit
and thus forcing the user to call.void
if their function does not returnF[Unit]
.This seems like a good candidate for a lint. Inspired by a Discord question, h/t @sbuzzard.
The text was updated successfully, but these errors were encountered: