On Jul 6, 10:42 am, Phil Hagelberg p...@hagelb.org wrote:
Hello folks.
I just pushed out Leiningen 1.6.1!http://bit.ly/lein-news
Highlights in this release include:
* New search task: find dependencies in all remote repositories (not
just clojars) from the command-line.
* New retest
Hi, what's the correct way to define an else clause of a cond form?
For example,
a)
(cond
(= total 20) 8.75
(or (amount 20) (= country US) 9.75)
(else 10.0))
b)
(cond
(= total 20) 8.75
(or (amount 20) (= country US) 9.75)
:default 10.0)
c)
(cond
(= total 20) 8.75
On Jul 6, 6:07 pm, Benny Tsai benny.t...@gmail.com wrote:
I believe (d) is considered the idiomatic way*. Btw, I think the second
case may not be written correctly; if the intended logic is that 9.75 should
be returned when either amount 20 or country = US, the code should look
something
On Jul 6, 5:34 pm, Conrad Taylor conra...@gmail.com wrote:
Hi, what's the correct way to define an else clause of a cond form?
For example,
a)
(cond
(= total 20) 8.75
(or (amount 20) (= country US) 9.75)
(else 10.0))
b)
(cond
(= total 20) 8.75
(or (amount 20
On Jul 6, 7:16 pm, David Sletten da...@bosatsu.net wrote:
Conrad,
The syntax of 'cond' is actually pretty straightforward. Following the symbol
'cond' you have pairs of predicate forms and consequent expressions. The
'cond' form evaluates each predicate in turn until one evaluates to true
On Jul 6, 7:33 pm, Benny Tsai benny.t...@gmail.com wrote:
Could you please post the entire form, including the code surrounding the
cond form (since total, amount, and country need to be defined somewhere)?
Benny, that was just sample code to zero in on the initial issue. I'm
working
through
On Jul 6, 8:08 pm, David Sletten da...@bosatsu.net wrote:
On Jul 6, 2011, at 10:58 PM, Conrad Taylor wrote:
On Jul 6, 7:33 pm, Benny Tsai benny.t...@gmail.com wrote:
Could you please post the entire form, including the code surrounding the
cond form (since total, amount
the road until its end, I would have made
different conclusions.
2010/1/19 Conrad Taylor conra...@gmail.com:
Hi, I'm starting to convert some code over from Lisp to Clojure.
Thus, I was wondering, what's the appropriate mapping for the
following forms:
defvar
defparamater
let
On Jan 18, 10:33 pm, Richard Newman holyg...@gmail.com wrote:
defvar
defparamater
def, pretty much. (Some of the niceties of CL semantics don't really
apply.)
let*
let.
defconstant
No equivalent. Use def and allow the JIT to do the is this constant?
work.
mapcar
map.
Hi, I'm starting to convert some code over from Lisp to Clojure.
Thus, I was wondering, what's the appropriate mapping for the
following forms:
defvar
defparamater
let*
defconstant
mapcar
BTW, I was able to find the Clojure Programming Tutorials and Tips
but it didn't require the above forms.
10 matches
Mail list logo