Fork me on GitHub
#clojure-uk
<
2019-10-09
>
dharrigan05:10:33

Good Morning!

Ben Hammond08:10:16

shame about the Glasgow clojurians meetup

Ben Hammond08:10:59

anyone got office space in the central belt of Scotland that they are prepared to let a meetup use?

otfrom09:10:46

whut? I missed that

Ben Hammond10:10:47

we've got Hugh in Edinburgh and you in Dundee and me in Perth

Ben Hammond10:10:24

theres a CodeBase in Stirling

otfrom10:10:26

I've not got a venue in Dundee

otfrom10:10:40

oh, how I miss London sometimes. Always easy to find a venue in London

otfrom10:10:03

Codebase in Stirling would be good, but not as handy for people actually in Glasgow

guy10:10:22

Morning!

otfrom15:10:01

question my google foo is failing me on. I'd like to do an into trasducer over 2 seqs. In non-transducer fashion I could do:

(into []
  (map (fn [x y] (vector x y)) seq-1 seq-2))
I'd like to be able to do something like
(into []
   (map (fn [x y] (vector x y)))
 seq-1
 seq-2)

otfrom15:10:33

I suppose the only way I can do it is by the following?

(into []
  (map (fn [x] (identity x))
 (map (fn [x y] (vector x y))))

otfrom15:10:56

so I have the one extra map at the beginning making my pairs to feed in, but the rest of the into transducer would be the same?

otfrom15:10:16

(obv (identity x) would be replaced with things that did a lot more work

dominicm15:10:48

Transducers aren't designed to handle multiple inputs

danielneal15:10:59

Sequence will let you pass multiple colls and map will accept them, but into won’t

danielneal16:10:30

(into [] (sequence (map (fn [x y] (vector x y)) seq-1 seq-2)) might work, but not sure if it’s legit, might be one for http://ask.clojure.org

otfrom16:10:23

interesting. I don't use sequence much. I mostly use into and transduce as those are the ones I've got my head around

Ben Hammond16:10:15

into is eager

Ben Hammond16:10:24

sequence is lazy

Ben Hammond16:10:00

there aren't many lazy bits around transducers, so that gives it a rarity value

Ben Hammond16:10:28

(`eduction` is sometimes lazy)

Ben Hammond16:10:38

but I think its only those two...?

Ben Hammond16:10:49

unless someone can remember otherwise

otfrom18:10:22

Would

(transduce ... (sequence ... s1 s2))
be reasonable?

dominicm18:10:10

Oh. Huh. I stand corrected. Very cool.

dominicm18:10:33

No. I'd just use sequence.

dominicm18:10:24

I mean, depends what you're doing.

dominicm18:10:27

But probably not