Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Sep 3, 2024
1 parent f2a9a01 commit f4e9134
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/belief/beliefMerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export function beliefMerge<A, B>(
): Belief<A | B> | MergeConflict {
const mergedValue = merge(content.value, increment.value)

// 下面刚好是偏序关系中比较两个元素的四种可能:
// (1) = -- a = b
// (2) < -- a < b
// (3) > -- a > b
// (4) | -- a 与 b 不可比较

if (mergedValue === content.value && mergedValue === increment.value) {
// 当 content.value 与 increment.value 等价时,
// 取 reasons 更小的,又当 reasons 一样大时,取 content。
Expand Down

0 comments on commit f4e9134

Please sign in to comment.