Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsfoster/elm-tuple-extra
Convenience functions for working with tuples
https://github.com/tsfoster/elm-tuple-extra
elm elm-lang tuples
Last synced: 3 months ago
JSON representation
Convenience functions for working with tuples
- Host: GitHub
- URL: https://github.com/tsfoster/elm-tuple-extra
- Owner: TSFoster
- License: bsd-3-clause
- Created: 2018-11-08T14:36:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-15T16:52:56.000Z (about 2 years ago)
- Last Synced: 2024-10-12T20:21:00.653Z (3 months ago)
- Topics: elm, elm-lang, tuples
- Language: Elm
- Homepage: https://package.elm-lang.org/packages/TSFoster/elm-tuple-extra/latest/
- Size: 40 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-tuple-extra
Convenience functions for working with tuples.
## `Tuple2`
* `pairTo`, `double` and `swap` for creating and arranging tuples
* `uncurry` and `apply` for using functions with values in a tuple
* `maybeMapFirst` and `maybeMapSecond` for lifting a `Maybe` out of a tuple## `Tuple3`
* Copies and extensions of all `Tuple` functions to work with 3-tuples (`first`, `second`, `third`, `mapFirst`, `mapSecond`, `mapThird`, `mapAllThree`)
* Functions for creating 3-tuples (`join`, `joinTo`, `triple`, `splitFirst`, `splitSecond`)
* Functions for rearranging values in 3-tuples (`reverse`, `rotateLeft`, `rotateRight`, `swapFirst`, `swapLast`)
* `uncurry` and `apply` for using functions with values in a 3-tuple
* `maybeMapFirst`, `maybeMapSecond` and `maybeMapThird` for lifting a `Maybe` out of a 3-tuple