elm-community/basics-extra/2.0.0

NOTE: this package is not compatible with Elm 0.19.1

Basics.Extra

Additional basic functions.

Tuples

(=>) : a -> b -> ( a, b )

A shorthand for writing 2-tuples. Very commonly used when expressing key/value pairs in CSS or Json encoders.

swap : ( a, b ) -> ( b, a )

Swaps the elements in a pair.

swap ( 1, 2 ) == ( 2, 1 )