HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulerandom-fu-0.3.0.1Haskell2010

Data.Random.Distribution.Bernoulli

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