Add Enumerable#frequency #7

Merged
merged 1 commit into from Aug 29, 2013

Conversation

Projects
None yet
2 participants
@fuadsaud
Contributor

fuadsaud commented Aug 27, 2013

No description provided.

lib/powerpack/enumerable/frequency.rb
@@ -0,0 +1,19 @@
+unless Enumerable.method_defined? :tail

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Aug 28, 2013

Owner

I sense a copy/paste error here ;-) tail => frequency.

@bbatsov

bbatsov Aug 28, 2013

Owner

I sense a copy/paste error here ;-) tail => frequency.

This comment has been minimized.

Show comment Hide comment
@fuadsaud

fuadsaud Aug 28, 2013

Contributor

Oh gosh, totally.

@fuadsaud

fuadsaud Aug 28, 2013

Contributor

Oh gosh, totally.

@bbatsov

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Aug 28, 2013

Owner

Shouldn't we name the method frequencies? It's named like this in Clojure and the result is actually several frequencies anyways.

Owner

bbatsov commented Aug 28, 2013

Shouldn't we name the method frequencies? It's named like this in Clojure and the result is actually several frequencies anyways.

@fuadsaud

This comment has been minimized.

Show comment Hide comment
@fuadsaud

fuadsaud Aug 28, 2013

Contributor

Hum, makes sense. I took it from from Haskell, but I agree the plural form is better suited.

Contributor

fuadsaud commented Aug 28, 2013

Hum, makes sense. I took it from from Haskell, but I agree the plural form is better suited.

README.md
@@ -27,6 +27,7 @@ Or install it yourself as:
* [Enumerable](http://rdoc.info/github/bbatsov/powerpack/Enumerable)
* [#drop_last](http://rdoc.info/github/bbatsov/powerpack/Enumerable#drop_last-instance_method)
* [#drop_last_while](http://rdoc.info/github/bbatsov/powerpack/Enumerable#drop_last_while-instance_method)
+ * [#frequency](http://rdoc.info/github/bbatsov/powerpack/Enumerable#frequency-instance_method)

This comment has been minimized.

Show comment Hide comment
@bbatsov

bbatsov Aug 28, 2013

Owner

It should be frequencies here.

@bbatsov

bbatsov Aug 28, 2013

Owner

It should be frequencies here.

bbatsov added a commit that referenced this pull request Aug 29, 2013

@bbatsov bbatsov merged commit 9091159 into bbatsov:master Aug 29, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment