amaksimov / elm-maybe-pipeline

Library providing infix Maybe.map & .andThen functions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elm-maybe-pipeline

Tired of using Maybe.map all the time? Make your code more understandable and readable with MaybePipeline!

Usage

Insted of Maybe.map f ma use ma ma ?> f.

  list
    |> List.head
    ?> .createdAt
    ?> Date.toTime

Insted of Maybe.andThen ma f use ma ??> f.

  laneId
    |> getLaneById board
    ??> \x -> next x lanes

About

Library providing infix Maybe.map & .andThen functions.

License:MIT License


Languages

Language:Elm 100.0%