MissingH-1.4.3.0: Large utility library

CopyrightCopyright (C) 2004-2011 John Goerzen
LicenseBSD-3-Clause
Stabilityprovisional
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Data.Tuple.Utils

Contents

Description

This module provides various helpful utilities for dealing with tuples.

Written by Neil Mitchell, http://www.cs.york.ac.uk/~ndm/

Synopsis
  • dup :: a -> (a, a)
  • triple :: a -> (a, a, a)
  • fst3 :: (a, b, c) -> a
  • snd3 :: (a, b, c) -> b
  • thd3 :: (a, b, c) -> c

Construction

dup :: a -> (a, a) Source #

Construct a pair by duplication of a single value

Since: 1.4.3.0

triple :: a -> (a, a, a) Source #

Construct a 3-tuple from a single value

Since: 1.4.3.0

Extraction

fst3 :: (a, b, c) -> a Source #

Take the first item out of a 3 element tuple

snd3 :: (a, b, c) -> b Source #

Take the second item out of a 3 element tuple

thd3 :: (a, b, c) -> c Source #

Take the third item out of a 3 element tuple