MissingH-1.4.3.0: Large utility library

Copyright | Copyright (C) 2004-2011 John Goerzen
License | BSD-3-Clause
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Data.Tuple.Utils

Contents

- Construction
- Extraction

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