core.logic

Weird behavior with negative-number domains

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Clojure 1.6.0

Description

These behave as normal:
=> (run* [q]
(fd/in q (fd/interval 1 10))
(fd/* q q 9))
(3)
=> (run* [q]
(fd/* q q 9)
(== q -3))
(-3)
=> (run* [q]
(fd/in q (fd/interval -10 -1)))
(-10 -9 -8 -7 -6 -5 -4 -3 -2 -1)

This is weird:
=> (run* [q]
(fd/in q (fd/interval -10 -1))
(fd/* q q 9))
()
I think it should return: (-3)

Also weird:
=> (run* [q]
(fd/in q (fd/interval -10 10))
(fd/* q q 9))
()
I think it should return: (-3 3)

Activity

Hide
David Nolen added a comment -

As with cKanren there isn't currently any support for negative domains.

Show
David Nolen added a comment - As with cKanren there isn't currently any support for negative domains.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: