Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Declined
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:tested against HEAD (0.8.0-rc3-SNAPSHOT) and CLJ 1.5.0-RC15
Description
(ns test
(:refer-clojure :exclude [==])
(:require
[clojure.core.logic :refer :all]))
;; This expression should evaluate to true, but it does not,
;; because the second run* returns (2 1) instead of (1 2).
(= (run* [q]
(conde
[(== q 1)]
[(== q 2)]))
(run* [q]
(conde
[(fresh [a] (== q 1))]
[(== q 2)])))
Activity
David Nolen
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
(ns test
(:refer-clojure :exclude [==]) (:require [clojure.core.logic :refer :all])) ;; This expression should evaluate to true, but it does not, ;; because the second run* returns (2 1) instead of (1 2). (= (run* [q] (conde [(== q 1)] [(== q 2)])) (run* [q] (conde [(fresh [a] (== q 1))] [(== q 2)]))) |
{code}
(ns test (:refer-clojure :exclude [==]) (:require [clojure.core.logic :refer :all])) ;; This expression should evaluate to true, but it does not, ;; because the second run* returns (2 1) instead of (1 2). (= (run* [q] (conde [(== q 1)] [(== q 2)])) (run* [q] (conde [(fresh [a] (== q 1))] [(== q 2)]))) {code} |
David Nolen
made changes -
| Resolution | Declined [ 2 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
This is not an error. No promises are made about the order of results. If you want need to verify that two runs are the same it's best to put the results into a set - we actually do this in the tests now.