Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Moved docstrings in arithmetic.

  • Loading branch information...
commit f4a54e43004552cca44a0be8649a2196d90e0aea 1 parent cbaf4b9
@sritchie authored
Showing with 10 additions and 5 deletions.
  1. +10 −5 src/main/clojure/clojure/core/logic/arithmetic.clj
View
15 src/main/clojure/clojure/core/logic/arithmetic.clj
@@ -2,42 +2,47 @@
(:refer-clojure :exclude [reify == inc = > < >= <=])
(:use clojure.core.logic))
-(defmacro = [x y]
+(defmacro =
"Goal for testing whether x and y are equal. Non-relational."
+ [x y]
`(fn [a#]
(let [wx# (walk a# ~x)
wy# (walk a# ~y)]
(if (clojure.core/= wx# wy# )
a# nil))))
-(defmacro > [x y]
+(defmacro >
"Goal for testing whether x is greater than y. Non-relational."
+ [x y]
`(fn [a#]
(let [wx# (walk a# ~x)
wy# (walk a# ~y)]
(if (clojure.core/> wx# wy# )
a# nil))))
-(defmacro >= [x y]
+(defmacro >=
"Goal for testing whether x is greater than or equal to y.
Non-relational."
+ [x y]
`(fn [a#]
(let [wx# (walk a# ~x)
wy# (walk a# ~y)]
(if (clojure.core/>= wx# wy# )
a# nil))))
-(defmacro < [x y]
+(defmacro <
"Goal for testing whether x is less than y. Non-relational."
+ [x y]
`(fn [a#]
(let [wx# (walk a# ~x)
wy# (walk a# ~y)]
(if (clojure.core/< wx# wy# )
a# nil))))
-(defmacro <= [x y]
+(defmacro <=
"Goal for testing whether x is less than or equal to y.
Non-relational."
+ [x y]
`(fn [a#]
(let [wx# (walk a# ~x)
wy# (walk a# ~y)]

0 comments on commit f4a54e4

Please sign in to comment.
Something went wrong with that request. Please try again.