Re: Question about this little method I wrote
ations [[x & xs]] > > (if xs > > (for [frstitems x tlitm (combinations xs)] > > (flatten (list frstitems tlitm))) > > x)) > > > On Feb 26, 2012, at 9:45 PM, Mike Ledoux wrote: > > > > (defn combinations
Question about this little method I wrote
So I recently decided to start learning Clojure. I installed Clojure box and wrote this little method to compute all possible combinations of input: (defn combinations [items] (if (== (count items) 1) (flatten items) (for [frstitems (flatten (first items))