Re: What to read after 3 dozen "introduction to transducers" blog posts

2017-05-10 Thread Luke Burton
> On May 6, 2017, at 10:56 AM, Matching Socks wrote: > > This one. https://tech.grammarly.com/blog/building-etl-pipelines-with-clojure > > "To be honest, this is a somewhat advanced usage of the transducers > machinery," says the Grammarly Engineering Blog, right after shoehorning a > Buffer

Re: with-open pattern

2017-05-10 Thread Paul Stadig
Hey Brian, The fact that a reducible (as I have implemented it in the reducible-stream library) will fully realize itself if it is used as a sequence is a drawback that I'm not happy with. In the back of my mind I believe there may be a way around it, but I'm not sure, and it is still a topic of

Re: What to read after 3 dozen "introduction to transducers" blog posts

2017-05-10 Thread John Gabriele
On Wednesday, May 10, 2017 at 3:16:42 AM UTC-4, Luke Burton wrote: > > > > On May 6, 2017, at 10:56 AM, Matching Socks > wrote: > > > > This one. > https://tech.grammarly.com/blog/building-etl-pipelines-with-clojure > > > > "To be honest, this is a somewhat advanced usage of the transducers

Incomplete With Destructuring Lists

2017-05-10 Thread Kevin Kleinfelter
Can I destructure a list, assigning the first and last few items individually, while putting several items from the middle into a list? I see that I can assign a list: (let [a '( 1 2 3 4)] ...) I can destructure the list as a whole: (let [[a b c d] '(1 2 3 4)] ...) I can destructure the lis

Re: Incomplete With Destructuring Lists

2017-05-10 Thread Alan Thompson
Don't try to force the destructuring DSL to do more than it was intended to do. Just do it manually (or write a macro if you really insist): (defn foo [& args] (let [ [a b c] (take 3 args) mid3 (take 3 (drop 3 args)) [g h i] (drop 6 args) ] (when (< 9 (count args))

Re: Incomplete With Destructuring Lists

2017-05-10 Thread Alan Thompson
Output: (foo 1 2 3 4 5 6 7 8 9) => [a b c] => [1 2 3] mid3 => (4 5 6) [g h i] => [7 8 9] (foo 1 2 3 4 5) => [a b c] => [1 2 3] mid3 => (4 5) [g h i] => [nil nil nil] (foo 1 2 3 4 5 6 7 8 9 10) => java.lang.IllegalArgumentException: Too many args:(1 2 3 4 5 6 7 8 9 10) On W