HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

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