Given a LiftArbitrary function, and 1..n Arbitrarys for different types A₁, A₂, ...Aₙ, returns the given list except every arbitrary for type Aᵢ has been replaced by an arbitrary for type Kind<F,In1,Out2,Out1,Aᵢ>. For example:
Arbitrary
A₁, A₂, ...Aₙ
Aᵢ
Kind<F,In1,Out2,Out1,Aᵢ>
const [arbOptionString, arbOptionNumber] = liftArbitraries<OptionTypeLambda>( Arbitraries.option,)( fc.integer(), fc.string(),)// arbOptionString ≡ fc.Arbitrary<Option<string>>// arbOptionNumber ≡ fc.Arbitrary<Option<number>> Copy
const [arbOptionString, arbOptionNumber] = liftArbitraries<OptionTypeLambda>( Arbitraries.option,)( fc.integer(), fc.string(),)// arbOptionString ≡ fc.Arbitrary<Option<string>>// arbOptionNumber ≡ fc.Arbitrary<Option<number>>
Rest
Given a LiftArbitrary function, and 1..n
Arbitrary
s for different typesA₁, A₂, ...Aₙ
, returns the given list except every arbitrary for typeAᵢ
has been replaced by an arbitrary for typeKind<F,In1,Out2,Out1,Aᵢ>
. For example:Example