[{"name":"PreferMaybeChaining","comment":" Prefer Maybe.map, Maybe.andThen, and Maybe.withDefault over case expressions.\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Reports case expressions on Maybe that can be simplified.\n\n    config =\n        [ PreferMaybeChaining.rule\n        ]\n\n\n## Fail\n\n    case maybeValue of\n        Nothing ->\n            Nothing\n\n        Just x ->\n            Just (f x)\n\n    case maybeValue of\n        Nothing ->\n            Nothing\n\n        Just x ->\n            lookup x\n\n    case maybeValue of\n        Nothing ->\n            defaultValue\n\n        Just x ->\n            x\n\n\n## Success\n\n    Maybe.map f maybeValue\n\n    Maybe.andThen lookup maybeValue\n\n    Maybe.withDefault defaultValue maybeValue\n\n    Maybe.Extra.withDefaultLazy (\\() -> complexExpr) maybeValue\n\n\n## Try it out\n\nYou can try this rule out by running the following command:\n\n```bash\nelm-review --template alex-tan/elm-review-opinionated-simplify/example --rules PreferMaybeChaining\n```\n\n","type":"Review.Rule.Rule"}],"binops":[]},{"name":"SimplifyLambdaToComposition","comment":" Converts lambdas like `(\\x -> func x.field)` to `(func << .field)`\n\nAlso handles nested applications like `(\\x -> f (g x.field))` -> `(f << g << .field)`\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Reports lambdas that can be simplified to function composition.\n\n    config =\n        [ SimplifyLambdaToComposition.rule\n        ]\n\n\n## Fail\n\n    List.sortBy (\\todo -> Time.posixToMillis todo.createdAt) todos\n\n    List.map (\\x -> f (g x.field)) list\n\n\n## Success\n\n    List.sortBy (Time.posixToMillis << .createdAt) todos\n\n    List.map (f << g << .field) list\n\n\n## Try it out\n\nYou can try this rule out by running the following command:\n\n```bash\nelm-review --template alex-tan/elm-review-opinionated-simplify/example --rules SimplifyLambdaToComposition\n```\n\n","type":"Review.Rule.Rule"}],"binops":[]}]