leancheck-0.4.1: Cholesterol-free property-based testing

Safe HaskellNone
LanguageHaskell2010

Test.LeanCheck.Function.ListsOfPairs

Contents

Description

Function enumeration via lists of pairs.

Synopsis

Documentation

functionPairs :: [[a]] -> [[b]] -> [[[(a, b)]]] Source #

Given tiers of input values and tiers of output values, return tiers with all possible lists of input-output pairs. Those represent functional relations.

associations :: [a] -> [[b]] -> [[[(a, b)]]] Source #

Given a list of domain values, and tiers of codomain values, return tiers of lists of ordered pairs of domain and codomain values.

Technically: tiers of left-total functional relations.

pairsToFunction :: Eq a => [(a, b)] -> a -> b Source #

Returns a partial function given by a list of input-output pairs.

NOTE: This function *will* return undefined values for unbound inputs.

defaultFunPairsToFunction :: Eq a => (a -> b) -> [(a, b)] -> a -> b Source #

Orphan instances

(Eq a, Listable a, Listable b) => Listable (a -> b) Source # 

Methods

tiers :: [[a -> b]] Source #

list :: [a -> b] Source #