Anyone has first hand experience? 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 unsub
Perhaps my choice of function names (abstract and concrete) for my
original post is not very appropriate. I did not mean to apply the OO
concept of abstract class, abstract methods, etc. Since it seems that
my original post did not convey my query clearly, I would try to
depict it with some "conc
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
Perhaps my choice of function names (abstract and concrete) for my
original post is not very appropriate. I did not mean to apply the OO
concept of abstract class, abstract methods, etc. Since it seemed
that my original post did not convey my query clearly, I would try to
depict it with some "co
This may be more about functional programming in general, rather than
clojure specific. However, since I mainly use clojure for learning
functional programming, I would like to discuss it here.
Basically, I can think of the following 2 ways of doing abstraction.
I would like to hear some comments
I define a function foo in which it calls an auxiliary function bar,
which is not yet defined, and a compiler exception is raised claiming
unable to resolve symbol bar.
Is there a way that I can define the functions in any order I want,
without taking care of defining the auxiliary function first?
On Feb 18, 10:51 pm, Stuart Halloway
wrote:
> You are using it incorrectly. Separate returns a vector of things that
> match, and a vector of things that don't match. Every time you call
> the function it matches against a different random number. Take a look
> at rand-elt in clojure.contr
ok, the following works as expected.
user> (separate (fn [n]
(= n 2))
'(1 2 3 4 5))
[(2) (1 3 4 5)]
now, I want to randomly select a number from '(1 2 3 4 5), I change
the function to the following, and the result is NOT expected.
user> (separate (fn [n]