navigation

ReimplementsFunction (FL0034)

Cause

A lambda function does nothing other than call an existing function, two examples below:

fun x y -> x + y fun x y -> foo x y

Rationale

The lambda functions are redundant.

How To Fix

Replace the lambda with the function that is being called.

fun x y -> x + y is the same as (+) fun x y -> foo x y is the same as foo

Rule Settings

{
    "reimplementsFunction": {
        "enabled": true
    }
}