On Dec 2, 2:39 am, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On 2 Dez., 04:47, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > So why is the above form not legal in Clojure? I would think it might
> > come in handy to define a function that relies on something currently
> > no
Hi,
On 2 Dez., 04:47, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> So why is the above form not legal in Clojure? I would think it might
> come in handy to define a function that relies on something currently
> not-yet-defined. Why is this the appropriate behavior?
As other stated you shou
I know you're asking for a reason, not a workaround, but I'll suggest
a workaround anyway:
(def mysecond)
(defn myfirst [] (mysecond))
Bill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post t
;; you can evaluate:
(defn myfirst [x] (mysecond x))
;; then bind that to:
(defn mysecond [x] (+ x 1))
user> (myfirst 1)
=> 2
Which winds up being more better once you let go of the CL assumptions
about ns :)
I'm finding that part difficult as well.
On Dec 1, 10:47 pm, "[EMAIL PROTECTED]" <[EMAI
;; you can evaluate:
(defn myfirst [x] (mysecond x))
;; then bind that to:
(defn mysecond [x] (+ x 1))
user> (myfirst 1)
=> 2
Which winds up being more better once you let go of the CL assumptions
about ns :)
I'm finding that part difficult as well.
On Dec 1, 10:47 pm, "[EMAIL PROTECTED]" <[EMAI
Hi Ryan,
In Clojure a var can refer to a function, or something else, and what
a var refers to can change at runtime.
You can call def with no arguments, or call declare, to def the var
name with no initial binding:
(declare mysecond)
-> #'user/mysecond
(defn myfirst [] (mysecond))
-> #'use
I'm reading through Practical Common Lisp as a way to get more
familiar with Lisp. In Chapter 4 I came across a stumbling block in
the section "S-expressions As Lisp Forms." Towards the end of that
section it says
"To determine what kind of form a given list is, the evaluator must
determine whe