DEV Community

loading...

Discussion on: Functional programming in Javascript

Collapse
mateiadrielrafael profile image
Matei Adriel

Nice post but:

  • monoids are semigroups with an empty value, what you described is clearly a semigroup, not a monoid
  • since es6 js engines support tail call optimization allowing you to have proper recursion
Collapse
stereobooster profile image
stereobooster

since es6 js engines support tail call optimization allowing you to have proper recursion

yes it is part of spec, but not supported by browsers. See:

Collapse
damxipo profile image
Damian Cipolat Author

yes, but I'm not sure if the newest version of the V8 engine is ready for big recursion loop. I have made some test using the chrome browser and have errors. Let me check, and comment you later thanks for the comment