elm / url

Build and parse URLs. Useful for HTTP and "routing" in single-page apps (SPAs)
https://package.elm-lang.org/packages/elm/url/latest/
BSD 3-Clause "New" or "Revised" License
75 stars 43 forks source link

Incorrect example for Url.Parser.Query.map function. #38

Closed akoppela closed 3 years ago

akoppela commented 4 years ago

https://package.elm-lang.org/packages/elm/url/latest/Url-Parser-Query#map

Example is:

page : Parser Int
page =
  map (Result.withDefault 1) (int "page")

According to signature for int function it should be

page : Parser Int
page =
  map (Maybe.withDefault 1) (int "page")
evancz commented 3 years ago

Fixed by #13

akoppela commented 3 years ago

Great work!