Fork me on GitHub
#clojure
<
2019-04-22
>
pablore13:04:17

I have a question, iterator-seq returns a lazy seq or not? I need to work with a possible infinite iterable class in Java.

jumpnbrownweasel13:04:16

Since iterators are lazy I think the answer has to be yes.

jumpnbrownweasel13:04:35

Or a better way to say it is that if the iterator is lazy, the sequence will be lazy.

tianshu13:04:24

Hi, folks. Can I give a name to a test case with clojure.test/are? Or how can I know which case failed in the report?

vemv19:04:12

(are [input expected] (testing input
                          (= expected
                             (system-under-stest input)))
  x y
  a b)

vemv19:04:33

i.e., add testing with a dynamically-built string

phill23:04:59

You may study a generic Swagger client, Martian (https://skillsmatter.com/meetups/8426-clojure-bytes); and also consider the Cognitect AWS client wrapper as a more sprawling example. By the way, maybe "Java 11" will eventually solve this, but here is a severe case of complecting. The two API wrappers you mentioned, and Martian, are coupled to Apache's HTTP Client; while Cognitect's AWS API wrapper apparently delegates to some Jetty thing. For "something special", I would like to mix and match: use any API wrapper with any HTTP library. If I have a biggish app that already has a way of managing HTTP connections, retries, pooling, throttling, etc.... with Netty, say... the API wrappers should participate in that!