Skip to content

Commit 682939e

Browse files
committed
Fixing the Many monad, respecting the specs
1 parent b0c69fd commit 682939e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/monads/many.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Monads
77
def and_then(&block)
88
block = ensure_monadic_result(&block)
99

10-
Many.new(values.map(&block).flat_map(&:values))
10+
Many.new(values.map(&block).map(&:values).flatten)
1111
end
1212

1313
def self.from_value(value)

0 commit comments

Comments
 (0)