Fork me on GitHub
#clojure-nl
<
2021-03-29
>
gklijs07:03:11

Morning, your guess is as good as mine about what to do today.. Likely some kubernetes / authentication stuff..

Mno15:03:12

Mornin, I'm trying to figure out if mapcat concatenate lazily

borkdude15:03:19

it does.

(take 2 (mapcat identity (repeat [1 2])))
(1 2)

borkdude15:03:30

if it would realize its argument, then this would never finish

borkdude15:03:00

but note that many "lazy" functions produce chunked seqs, so at minimum 32 elements are realized when you take the first element. don't rely on lazy evaluation if you want to rely on side effects in those

Mno16:03:21

That's an easy way to check! Yeah in my case it's a series of api calls

Mno16:03:47

An infinite series of api calls

borkdude16:03:49

yeah, it's probably better to not use laziness here, unless you don't care about the exact times the API is called (could be an off by ~32)

Mno16:03:48

It's more about the amount of data not ovwrwhming the ram

Mno16:03:55

It has to do with an internal library we use

Mno16:03:02

But that's good to know