cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Primitive.Types.Coin.Gen

Synopsis

Documentation

genCoinPartition :: Coin -> Int -> Gen ( NonEmpty Coin ) Source #

Partitions a coin randomly into a given number of parts.

Satisfies the following properties:

forAll (genCoinPartition c i) $ (==       c) . fold
forAll (genCoinPartition c i) $ (== max 1 i) . length