Good point Moe, given the pasted code. Actually I made an error when trying 
to simplify the code for this list. The comp fn should have been:

kafka-ch (chan 1 (comp (map sse-data)
                                       (filter #(matching-event 
client-filter (.key %)))))

But my mistake was even more embarrassing. It should have been

kafka-ch (chan 1 (comp (filter #(matching-event client-filter (.key %)))
                                       (map sse-data)))]

Doh!


On Saturday, 27 August 2016 01:25:57 UTC+2, Moe Aboulkheir wrote:
>
>
>
> On Sat, Aug 27, 2016 at 12:08 AM, mond <r...@mcdermott.be <javascript:>> 
> wrote:
>
>> Is that the same thing or have I made a(nother) / different mistake?
>>
>>
> At a glance, it looks like the functions you're passing into map and 
> filter are shaped wrong - (comp (map sse-data) (filter 
> matching-event-client-filter)) may have been the intention.  #(fn ..) is 
> going to create a no-arg fn which returns the explicit (fn ...) when 
> called.  Both # and fn turn out to be unnecessary as you're not doing 
> anything on top of passing through the single argument.
>
> I have no idea if this is the cause of your error, though.
>
> Take care,
> Moe
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to