Permalink
Cannot retrieve contributors at this time
Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…
| module Util exposing (..) | |
| average : List Int -> Float | |
| average values = | |
| (toFloat <| List.sum values) / (toFloat <| List.length values) | |
| mapMaybeInt : (Maybe Int -> msg) -> String -> msg | |
| mapMaybeInt msg = | |
| String.toInt >> Result.toMaybe >> msg | |
| isJust : Maybe a -> Bool | |
| isJust maybe = | |
| case maybe of | |
| Nothing -> | |
| False | |
| _ -> | |
| True | |
| isNothing : Maybe a -> Bool | |
| isNothing = | |
| not << isJust |