On Mar 15, 2009, at 10:53 PM, Aaron Brooks wrote:
So, here's a request -- can we get macro dispatch for other base numbers? The CL notation is reasonable, already known and quite readable. Besides, Clojure tells me it /really/ /wants/ to... ;-)
For integers, Clojure currently supports all the bases from 2 to 36 just like Common Lisp. These are the differences:
- the syntax doesn't use a leading #
- Clojure doesn't provide #b, #o, or #x for binary, octal, hex
- Clojure interprets a leading 0 (zero) as meaning octal
- Clojure interprets a leading 0x as meaning hex
Note that by Clojure's rules, all integers regardless of radix start
with one of the decimal digits 0 through 9.
For ratios, Common Lisp supports providing a radix, but Clojure doesn't. --Steve
smime.p7s
Description: S/MIME cryptographic signature
