CurryInfo: pflp-2.1.0 / PFLP.enum

definition:
 
enum :: [a] -> [Probability] -> Dist a
enum xs ps
  | 1.0 - (foldl (+) 0.0 ps') < 0.0001 && all (> 0.0) ps'
  = member (zipWith Dist xs ps')
  | otherwise
  = error ("PFLP.enum: probabilities do not add up to 1.0 " ++
             "or are not strictly positive")
 where ps' = take (length xs) ps
demand:
 no demanded arguments
deterministic:
 possibly non-deterministic operation
documentation:
 
Creates a distribution based on a given list of events and another list
providing the corresponding probabilities. This function also ensures that
the relevant probabilities add up to `1.0` and are strictly positive.
failfree:
 <FAILING>
indeterministic:
 referentially transparent operation
infix:
 no fixity defined
iotype:
 {(_,_) |-> _}
name:
 enum
precedence:
 no precedence defined
result-values:
 _
signature:
 [a] -> [Prelude.Float] -> Dist a
solution-complete:
 operation might suspend on free variables
terminating:
 possibly non-terminating
totally-defined:
 possibly non-reducible on same data term