DEV Community

Discussion on: From object-oriented JS to functional ReScript

Collapse
 
fhammerschmidt profile image
Florian Hammerschmidt

Great article!

I found two errors in your encapsulation example:

  1. the Array.sliceToEnd should actually be Array.slice based on the parameters.
  2. the Array.concatMany is missing a pair of square brackets (Array.concatMany([first, [layer], [last]]))

Assuming the Array module comes from ReScript's standard library Belt, of course.

Collapse
 
novak_20 profile image
Victor N.

Thanks for the feedback! Indeed, these are mistakes, fixed them (and found two more, 99 left I hope :)