@@ -12,16 +12,17 @@ import { flatten, fmap } from "./monad.js"
12
12
// pack the result up into a (one-item) belief system.
13
13
//
14
14
// The only choice made here is that we are following the philosophy
15
- // set out in the main text of operating on the strongest possible
16
- // consequences of what we currently believe (as found by the query)
17
- // rather than on all variations of everything we might believe.
15
+ // set out in the main text of operating on the most informative
16
+ // possible consequences of what we currently believe (as found by the
17
+ // query) rather than on all variations of everything we might
18
+ // believe.
18
19
19
20
defineHandler (
20
21
fmap ,
21
22
[ isFunction , isBeliefSystem ] ,
22
23
( f , ma : BeliefSystem < any > ) => {
23
- const strongestBelief = beliefSystemQuery ( ma )
24
- return BeliefSystem ( [ fmap ( f , strongestBelief ) ] )
24
+ const bestBelief = beliefSystemQuery ( ma )
25
+ return BeliefSystem ( [ fmap ( f , bestBelief ) ] )
25
26
} ,
26
27
)
27
28
@@ -52,17 +53,17 @@ defineHandler(
52
53
// with a belief system inside (namely incorporate the reasons of that
53
54
// belief into the beliefs of that belief system).
54
55
//
55
- // This handler also uses query to consider only the strongest belief
56
- // of the inner belief system.
56
+ // This handler also uses query to consider only the most informative
57
+ // belief of the inner belief system.
57
58
58
59
defineHandler (
59
60
flatten ,
60
61
[ ( mma ) => isBelief ( mma ) && isBeliefSystem ( mma . value ) ] ,
61
62
( mma : Belief < BeliefSystem < any > > ) => {
62
63
const innerBeliefSystem = mma . value
63
- const strongestBelief = beliefSystemQuery ( innerBeliefSystem )
64
+ const bestBelief = beliefSystemQuery ( innerBeliefSystem )
64
65
const newBeliefSystem = BeliefSystem (
65
- flatten ( Belief ( strongestBelief , mma . reasons ) ) ,
66
+ flatten ( Belief ( bestBelief , mma . reasons ) ) ,
66
67
)
67
68
return flatten ( newBeliefSystem )
68
69
} ,
0 commit comments