Skip to content

Commit 67973f7

Browse files
committed
Move methods to class directories.
1 parent ea44885 commit 67973f7

22 files changed

Lines changed: 47 additions & 16 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
require 'functor'
2+
13
module Enumerable
24

3-
#
45
# Higher-order form of #select.
56
#
67
# [1, 2, 3].where > 2 #=> [3]
78
#
89
def where
9-
HOM.new do |op, *a, &b|
10+
Functor.new do |op, *a, &b|
1011
select{ |e| e.public_send(op, *a, &b) }
1112
end
1213
end

0 commit comments

Comments
 (0)