HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

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, …