BlakeGuilloud / ganon

A javascript library
MIT License
92 stars 196 forks source link

Fix mapArray to work as intended #786

Closed ktilcu closed 5 years ago

ktilcu commented 5 years ago

Issue #785

ktilcu commented 5 years ago

@crhallberg wanna give this a look?

crhallberg commented 5 years ago

Sorry for the delay! I typed out a response but I guess I never sent it.

About the ++ mutation test, if you wanted to add that as a test, I think it would be fine but I would leave the [["h","e","l","l","o"]... test in there. The tests were designed to make sure the code worked correctly and that case is still one we should check.

crhallberg commented 5 years ago

That being said, your solution looks valid, so once that test is restored, this is good to go!

ktilcu commented 5 years ago

@crhallberg I removed that test because it's not valid.

https://repl.it/@ktilcu/JaggedStupidParallelport

Even the real map doesn't make that happen. Though I guess I could by deep cloning.

crhallberg commented 5 years ago

That seems fair. I'm certainly not going to stand in the way of progress!