This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0
Ternary and Null Coalescing operators for Elm
version 1.0.1
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.1
Committed At 2018-03-24 20:37:40 UTC
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

elm-ternary Build Status

This simple package provides infix functions for shorter if/then/else conditionals, known as ternary, and a "null" coalescing operator for Maybes.

import Ternary exposing ((?), (?:))

exampleTernary =
  (1 + 1 == 2) ? "Math works!" <| "Math is wrong ):"

exampleNullCoalescing =
  Just "foo" ?: "bar"