core.logic

generalize the notion of hash for robustness

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

The second nom/hash throws an exception, because the nom/hash constraint is ran before the predc one.

(is (= (run* [q]
         (nom/fresh [x]
           (fresh [y]
             (predc y nom? `nom?)
             (nom/hash y x)
             (== y 'foo))))
      ()))

(is (= (run* [q]
         (nom/fresh [x]
           (fresh [y]
             (nom/hash y x)
             (predc y nom? `nom?)
             (== y 'foo))))
      ()))

Perhaps, we can generalize the notion of hash.

  1. logic-102.diff
    07/Jan/13 12:39 PM
    5 kB
    Nada Amin
  2. refactoring.diff
    08/Jan/13 7:04 AM
    2 kB
    Nada Amin

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: