ok. Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send em
Richard Newman writes:
> Incidentally, I initially didn't know about `when-not` -- I figured
> that `unless` had simply been omitted -- so I defined:
>
> (defmacro unless [pred & body]
> `(when (not ~pred) ~...@body))
I did the same, and then was frustrated enough to dig through the core
API d
On Sun, 28 Feb 2010 14:18:50 -0800
Richard Newman wrote:
> This is an interesting point, though -- does "unless" communicate
> something slightly different to* "when not", despite being
> functionally identical? And is the distinction important enough to
> justify a move towards a confusing
I always thought unless is a very nice name for if-not... I'm
beginning to understand why we have if-not / when-not and no unless
out of the box. :-)
All best,
Michał
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email t
I'm still undecided whether to shake this habit:
,
| (defmacro unless [pred & body]
| `(when-not ~pred ~...@body))
`
Heh. I still think that "unless" is a better name than "when-not", but
I've migrated pretty easily.
This is an interesting point, though -- does "unless" communicat
Richard Newman writes:
> There are more subtle clues that you'll pick up in certain people's
> styles, too -- I'm sure my use of when has a very different pattern to
> a Java guy's, colored by my Common Lisp experience.
I'm still undecided whether to shake this habit:
,
| (defmacro unless [
hmm...I don't understand why clojure when and if simultaneously? What
is the diffirences between them and when I should use one instead
another one?
Disregarding all of the practical benefits (such as an implicit do):
languages often incorporate apparently redundant constructs because
one of
Hello!
On 28 Feb., 18:08, Аркадий Рост wrote:
> Hi!
>
> hmm...I don't understand why clojure when and if simultaneously? What
> is the diffirences between them and when I should use one instead
> another one?
Besides the implicit do, which reynard mentioned, it's generally
idiomatic to use while
user> (when true
(println "line 1")
(println "line 2")
(println "line 3")
(println "there is no need to use #'do")
(println "there is nothing to evaluate when false and return nil"))
line 1
line 2
line 3
there is no need to use #'do
there is nothing to evalua
Hi!
hmm...I don't understand why clojure when and if simultaneously? What
is the diffirences between them and when I should use one instead
another one?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@goog
10 matches
Mail list logo