An example will make it clear for you...

(str <some-lazy-seq>) => (str '("foo" "bar" "baz"))

(apply str <some-lazy-seq>) => (str "foo" "bar" "baz)

Hope this helps.

-BG

On Sat, Dec 15, 2012 at 3:48 PM, Peter West <peter.b.w...@gmail.com> wrote:
> Thanks Baishampayan.
>
> I'm still puzzled about this though, because (doc str) says that with one
> argument x, str returns x.toString(). What it returns is
> "clojure.lang.LazySeq@fe1"
>
> So it seems to be returning a lazy sequence. Why is the function not simply
> applied? Other functions are "applied" simple by expressing their form.
>
>
> On Saturday, 15 December 2012 18:52:26 UTC+10, Baishampayan Ghose wrote:
>>
>> The apply is needed here because filter is going to return a sequence
>> of strings and you really want to `apply' str on it.
>>
>> -BG
>>
>> On Sat, Dec 15, 2012 at 1:39 PM, Peter West <peter....@gmail.com> wrote:
>> > A couple of questions, if I may.
>> >
>> > In (partial apply str) why the apply?
>> >
>> > Given the apply, why the partial?
>>
>>
>>
>> --
>> Baishampayan Ghose
>> b.ghose at gmail.com
>
> --
> 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 email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
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 email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to