clojure-uk

2025-05-09T07:01:11.059609Z

Good morning all.

thomas 2025-05-09T08:26:35.226899Z

mogge

Yuriy Zaytsev 2025-05-09T08:31:15.511719Z

Morning

dharrigan 2025-05-09T16:11:43.658419Z

You know the (not (empty? coll)) is deemed to be non-idomatic, I've been using (some? (seq coll)) instead...returns true or false if the sequence contains anything (or not as the case may be). Any other ways of doing this whilst using seq?

dharrigan 2025-05-09T16:11:54.398609Z

(shocker, a clojure question!)

seancorfield 2025-05-09T16:32:27.617839Z

Why not just (seq coll) and rely on truthy/falsey?

dharrigan 2025-05-09T16:39:05.221819Z

(some of it used in other systems, like a json response, i.e., hasMembers: true)

dharrigan 2025-05-09T16:39:47.194109Z

it was just clojure to clojure, then yes, truthy would be fine 🙂

seancorfield 2025-05-09T20:13:41.977179Z

(boolean (seq coll)) is what I would use in that case, boolean is a general "truthy/falsey -> Boolean" coercion...