On Thu, Apr 7, 2011 at 7:17 PM, Meikel Brandmeyer wrote:
> Each anonymous function you define via fn or #() generates a new
> class. Functions like comp or partial just return a new instance of
> the anonymous class contained in the comp resp. partial definition. So
> they don't create a new class
Hi,
On 7 Apr., 15:11, Baishampayan Ghose wrote:
> On a more serious note, how do I find out how many classes a form compiles to?
Each anonymous function you define via fn or #() generates a new
class. Functions like comp or partial just return a new instance of
the anonymous class contained in
On Thu, Apr 7, 2011 at 9:11 AM, Baishampayan Ghose wrote:
> On Thu, Apr 7, 2011 at 6:34 PM, Chouser wrote:
Given a collection of functions
(def fs [#(* % 10) #(+ % 1)])
and some numbers
(def c [1 2 3])
How do I apply all the functions to c so that the
On Thu, Apr 7, 2011 at 6:34 PM, Chouser wrote:
>>> Given a collection of functions
>>>
>>> (def fs [#(* % 10) #(+ % 1)])
>>>
>>> and some numbers
>>>
>>> (def c [1 2 3])
>>>
>>> How do I apply all the functions to c so that the results of one
>>> function are passed to the other. In the same way -
On Thu, Apr 7, 2011 at 8:56 AM, Baishampayan Ghose wrote:
>> Given a collection of functions
>>
>> (def fs [#(* % 10) #(+ % 1)])
>>
>> and some numbers
>>
>> (def c [1 2 3])
>>
>> How do I apply all the functions to c so that the results of one
>> function are passed to the other. In the same way
On Thu, Apr 7, 2011 at 6:26 PM, Scott Jaderholm wrote:
> (map #((apply comp (reverse fs)) %) c)
> => (11 21 31)
Don't need the lambda around comp because comp returns a function
which can be mapped.
Regards,
BG
--
Baishampayan Ghose
b.ghose at gmail.com
--
You received this message because y
> Given a collection of functions
>
> (def fs [#(* % 10) #(+ % 1)])
>
> and some numbers
>
> (def c [1 2 3])
>
> How do I apply all the functions to c so that the results of one
> function are passed to the other. In the same way -> works. Thus in
> this case the expected result would be: 11 21 31
(map #((apply comp (reverse fs)) %) c)
=> (11 21 31)
Scott
On Thu, Apr 7, 2011 at 4:51 AM, zm wrote:
>
> Hi,
>
> Given a collection of functions
>
> (def fs [#(* % 10) #(+ % 1)])
>
> and some numbers
>
> (def c [1 2 3])
>
> How do I apply all the functions to c so that the results of one
> func