jfmengels / elm-review-simplify

Provides elm-review rules to simplify your Elm code
https://package.elm-lang.org/packages/jfmengels/elm-review-simplify/latest/
BSD 3-Clause "New" or "Revised" License
20 stars 9 forks source link

Add Random.map simplifications #134

Closed lue-bird closed 1 year ago

lue-bird commented 1 year ago
Random.map identity generator
--> generator

Random.map (always a) generator
--> Random.constant a

-- not in summary
Random.map << always
--> Random.map

Random.map f (Random.constant x)
--> Random.constant (f x)

-- not in summary
Random.map f << Random.constant
--> Random.constant << f

part of https://github.com/jfmengels/elm-review-simplify/issues/109

Some comments