specter

ozimos 2025-06-20T09:52:59.239619Z

using specter how do I get from (range 20) • first just the even numbers • and then only the 3rd to 7th result from the previous step

Samuel Ludwig 2025-06-20T13:57:00.235499Z

i can start you with the first part, which'll be (select [ALL even?] (range 20))

cjmurphy 2025-06-20T14:20:01.200999Z

(s/select-one [(s/subselect s/ALL (s/pred even?)) (s/srange 2 7)] (range 20))

👍 1
nathanmarz 2025-06-20T18:00:42.844039Z

that last one is more concise like this:

(select-any [(filterer even?) (srange 2 7)] (range 20))

👍 1