Currently I am trying to partition my lists in clojure into even splits of even values. To explain.
I have
(def a '(1 2 3 4 5 6 7 8 9 10))
What I want to do is give it a partition function and create even lists that are even in count. so if I were to split my list by 2 I would want it to look like
((1 2 3 4 5 6) (7 8 9 10)) or
((1 2 3 4)(5 6 7 8 9 10)) producing 2 lists with even counts.
or if I want to split by 4 into even lists it would look something like
((1 2)(3 4)(5 6)(7 8 9 10))
I will always be splitting by even (ex. 2,4,8,16,32)
. but I want every return list to have even counts without remainders.
I am at a lost and have created numerous parition functions all which don't work. Any help is appreciated.