Warning when degenerate unary is created?

In our codebase I notice junior engineers often parrot and write Js.Array2.map(x => x->otherUnaryFunction)
Another thought in a series but seems like a thing that compiler could warn against easily?
Maybe it inlines but I doubt it, and it is some allocation etc that isnt necessary.

Again just another thought. we’ll see if i can get into it myself.


1 Like