I believe it's a case of intent-mapping, clarity o...
# announcements
f
I believe it's a case of intent-mapping, clarity of use. When you use the receiver function, does it feel like a natural extension of the object you call it on? If so, declaring it as a
T.() -> R
makes it more expressive. Conversely, if it feels like a function that simply happens to act on
T
instead of acting as if on behalf of
T
, then it might feel better to declare it as a
(T) -> R
. I'm not sure if there's any semantic difference between the two, though. Could be I've missed something.