vectortiles-1.2.0.1: GIS Vector Tiles, as defined by Mapbox.

Copyright(c) Azavea 2016
LicenseApache 2
MaintainerColin Woodbury <cwoodbury@azavea.com>
Safe HaskellSafe
LanguageHaskell2010

Geography.VectorTile.Util

Description

 

Synopsis

Documentation

pairs :: [a] -> Either Text [(a, a)] Source #

A sort of "self-zip", forming pairs from every two elements in a list. Fails if there is an uneven number of elements.

unpairs :: [(a, a)] -> [a] Source #

Flatten a list of pairs. Equivalent to:

ps ^.. each . both

both :: (a -> b) -> (a, a) -> (b, b) Source #

Apply a pure function to both elements of a tuple.

mtoe :: a -> Maybe b -> Either a b Source #

Convert a Maybe to an Either, with some given default value should the result of the Maybe be Nothing.