Re: Question about this little method I wrote

2012-03-18 Thread Mike Ledoux
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

2012-02-27 Thread Mike Ledoux
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))