Thanks both - (and yes I did mean brackets - oops).
On 19 Jan 2013, at 18:26, Sven Johansson wrote:
> On Sat, Jan 19, 2013 at 7:02 PM, Colin Yates wrote:
> user=> (defn stream1 [] repeatedly create-user)
>
> This function invokes neither repeatedly nor create-user. It pointlessly
> refers to
On Sat, Jan 19, 2013 at 7:02 PM, Colin Yates wrote:
> user=> (defn stream1 [] repeatedly create-user)
>
This function invokes neither repeatedly nor create-user. It pointlessly
refers to repeatedly and then returns a reference to the create-user
function.
Which is function and not a sequence, wh
On Sat, Jan 19, 2013 at 11:32 PM, Colin Yates wrote:
> I am struggling to understand what Clojure is doing. This is definitely a
> newbie question but I cannot figure it out :). The question is best asked
> via a repl session:
>
> [code]user=> (defn create-user [] {:id 1})
> #'user/create-user
>
I am struggling to understand what Clojure is doing. This is definitely a
newbie question but I cannot figure it out :). The question is best asked
via a repl session:
[code]user=> (defn create-user [] {:id 1})
#'user/create-user
user=> (create-user)
{:id 1}
user=> (take 10 (repeatedly create-