chooseCoins :: Coin c
            => Word64 -- ^ Target price to pay.
            -> Word64 -- ^ Fee price per 1000 bytes.
            -> Bool   -- ^ Try to find better solution when one is found
            -> [c]    -- ^ List of ordered coins to choose from.
            -> Either String ([c], Word64)
               -- ^ Coin selection result and change amount.
chooseCoins target kbfee continue coins =
    runIdentity $ sourceList coins $$ chooseCoinsSink target kbfee continue
chooseCoins :: Coin c
            => Word64 -- ^ Target price to pay.
            -> Word64 -- ^ Fee price per 1000 bytes.
            -> Bool   -- ^ Try to find better solution when one is found
            -> [c]    -- ^ List of ordered coins to choose from.
            -> Either String ([c], Word64)
chooseCoins target kbfee continue coins =
    runIdentity $ sourceList coins $$ chooseCoinsSink target kbfee continue
chooseCoins target kbfee continue coins =
    runIdentity $ sourceList coins $$ chooseCoinsSink target kbfee continue