object

# pairs

> Useful predicates over lists of pairs (key-value terms).

author:
  `Paulo Moura`
version:
  `1.1`
date:
  `2011/1/7`

compilation flags:
  `static, context_switching_calls`

(no dependencies on other files)

## Public interface

### keys_values/3

> Converts between a list of pairs and lists of keys and values.

compilation flags:
  `static`
template:
  `keys_values(Pairs,Keys,Values)`
mode – number of proofs:
  `keys_values(+list(pair),-list,-list) – one`
  `keys_values(-list(pair),+list,+list) – one`

### keys/2

> Extracts a list of keys from a list of pairs.

compilation flags:
  `static`
template:
  `keys(Pairs,Keys)`
mode – number of proofs:
  `keys(+list(pair),-list) – one`

### values/2

> Extracts a list of values from a list of pairs.

compilation flags:
  `static`
template:
  `values(Pairs,Values)`
mode – number of proofs:
  `values(+list(pair),-list) – one`

### transpose/2

> Transposes a list of pairs by swapping each pair key and value. The relative order of the list elements is kept.

compilation flags:
  `static`
template:
  `transpose(Pairs,TransposedPairs)`
mode – number of proofs:
  `transpose(+list(pair),-list(pair)) – one`

## Protected interface

(none)

## Private predicates

(none)

## Operators

### (none)

## Remarks

### (none)