hemanth / functional-programming-jargon

Jargon from the functional programming world in simple terms!
http://git.io/fp-jargons
MIT License
18.58k stars 1.02k forks source link

Avoid polluting globals #203

Open MartinMuzatko opened 4 years ago

MartinMuzatko commented 4 years ago

Hey there! I think for the sake of simplicity, you extend the prototype of Array. To communicate best practices, I'd like to come up with examples that do not extend the global Array object.

The alternative, to create objects from scratch is also more real-world oriented.

Here is a list of examples that use prototype

Thank you.

jethrolarson commented 2 years ago

While I agree, we'd have to either create our own List or some other type that implements all the relevant type classes. I have mixed feelings on whether that'd make it harder to understand

jethrolarson commented 2 years ago

Maybe defining everything in terms of static-land instead of fantasy-land would be better. https://github.com/fantasyland/static-land