Handbook
Glossary
(conditional-probabilities) ( seq i -- p )
Vocabulary
combinators
.
random
.
private
Inputs
seq
an
object
i
an
object
Outputs
p
an
object
Definition
USING:
kernel
math
sequences
;
IN:
combinators.random.private
:
(conditional-probabilities)
( seq i -- p )
[
dup
0
>
[
head
[
1
swap
-
]
[
*
]
map-reduce
]
[
2drop
1
]
if
]
[
swap
nth
]
2bi
*
;