HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulerandom-fu-0.3.0.1Haskell2010

Data.Random.Distribution.Bernoulli

  • 1 type
  • 6 values
  • Packagerandom-fu-0.3.0.1
  • Exports7
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceBernoulli.hs
valuebernoulli :: Distribution (Bernoulli b) a => b -> RVar a
#

Generate a Bernoulli variate with the given probability. For Bool results, bernoulli p will return True (p*100)% of the time and False otherwise. For numerical types, True is replaced by 1 and False by 0.

valuebernoulliT :: Distribution (Bernoulli b) a => b -> RVarT m a
#

Generate a Bernoulli process with the given probability. For Bool results, bernoulli p will return True (p*100)% of the time and False otherwise. For numerical types, True is replaced by 1 and False by 0.

newtypenewtype Bernoulli b a
#

Constructors

Instances32CDF, Distribution, …