calmm-js / partial.lenses

Partial lenses is a comprehensive, high-performance optics library for JavaScript
MIT License
915 stars 36 forks source link

How to read source code? #160

Closed jituanlin closed 6 years ago

jituanlin commented 6 years ago

Yes, this project is cool, but when I read it's source code, I am so confuse. It's code style is so different, even I have functional programming language experience like Haskell, Clojure, Scala. What knowledge should I have in order to understand this code

polytypic commented 6 years ago

Yes, the implementation has lots of low level optimizations, so it is fairly complex in places. I recently wrote a short document that describes a simplified implementation: Partial Lenses Implementation. The wiki also contains a page on traversals: Traversals in depth. Other than that, I'd recommend asking more specific questions on the implementation. You can ask here or you can join the Gitter channel and ask there.

jituanlin commented 6 years ago

@polytypic Thanks!