lib/funkr/extensions/array.rb in funkr-0.0.4 vs lib/funkr/extensions/array.rb in funkr-0.0.5

- old
+ new

@@ -89,12 +89,12 @@ else [[], self] end end # Constitue des groupes de n éléments - def groups_of(ar, n) + def groups_of(n) return [] if self.empty? - [self.take(n)] + groups_of(self.drop(n), n) + [self.take(n)] + self.drop(n).groups_of(n) end end