Skip to content

Feature #8 delicate array wrapping Many.from_value#11

Closed
sclinede wants to merge 1 commit intotomstuart:masterfrom
sclinede:feature/delicate-array-wrapping
Closed

Feature #8 delicate array wrapping Many.from_value#11
sclinede wants to merge 1 commit intotomstuart:masterfrom
sclinede:feature/delicate-array-wrapping

Conversation

@sclinede
Copy link
Copy Markdown
Contributor

In my thoughts this feature also adds problem when value is Hash. Since after Many.from_value it would not be same object as expected, for example.
But on the other hand following code would work well (borrowed from #8):

Blaher = Struct.new(:blahs)
Bloher = Struct.new(:blohs)
blahers = [Blaher.new([Bloher.new([1, 2, 3, 4])])]
Monads::Many.new(blahers).blahs.blohs.values
# => [1,2,3,4]

This PR is opened for discussion.

@sclinede sclinede changed the title Feature #8 delicate array wrapping Many#from_value Feature #8 delicate array wrapping Many.from_value Feb 20, 2016
@sclinede
Copy link
Copy Markdown
Contributor Author

sclinede commented Apr 5, 2016

Should be solved with #9

@sclinede sclinede closed this Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant