Fork me on GitHub

I give up. I'm stuck on the this very early lesson that's marked "Easy". It's the Sublist lesson. If there's something to be learned about lists, I'm not getting it. FWIW, I feel like anything that requires recursion in the solution should not be marked easy.

Bobbi Towers21:04:42

It looks like you're on the right track, and it would be recommended not to use recursion to solve this. Clojure's standard library includes many very powerful sequence functions that can be used. Hint: check out partition : Also, instead of dispatching to multiple when calls, I'd suggest using cond . I'll provide a more specific example over on the website. Finally, there's no shame in taking a peek at the community solutions if you get stuck. Getting familiar with Clojure's idioms takes time but is well worth it, and in my opinion the best way to do this is by looking at many different approaches.


That's why I'm frustrated. I've done Clojure for a long time, and the answer here is not obvious and doesn't seem at all connected with learning about lists.

Bobbi Towers22:04:59

I can understand that. The actual reason is that the exercise was ported from another language track many years ago, and they likely left it as "Sublist" (instead of changing it to "Subvector") in order to remain consistent with the others.