Skip to content

Dan Meehan Solution#66

Open
dmee3 wants to merge 1 commit intopaircolumbus:masterfrom
dmee3:master
Open

Dan Meehan Solution#66
dmee3 wants to merge 1 commit intopaircolumbus:masterfrom
dmee3:master

Conversation

@dmee3
Copy link

@dmee3 dmee3 commented May 18, 2017

it "should loop over the array and return a new array" do
loopy = [1,2,3]
expect(loopy._fill_in_method_here_ { |n| n + 1 }).to eq [2,3,4]
expect(loopy.map! { |n| n + 1 }).to eq [2,3,4]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

map is typically preferred over map!. There's no need to modify loopy here.

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.

2 participants