Copyright | (c) 2018 Kowainik |
---|---|
License | MIT |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Safe Haskell | Safe |
Language | Haskell2010 |
Contains utility functions for working with tuples.
Documentation
Creates a tuple by pairing something with itself.
>>>
dupe "foo"
("foo","foo")>>>
dupe ()
((),())
mapToFst :: (a -> b) -> a -> (b, a) Source #
Apply a function, with the result in the fst slot, and the value in the other.
A dual to mapToSnd
>>>
mapToFst (+1) 10
(11,10)