DEV Community

loading...

Discussion on: What [I think] I know about van Laarhoven lenses

Collapse
olalonde profile image
Oli Lalonde

Great article! I'm a bit mystified by the compose argument order... Why is it that way? Intuitively it would make more sense if it was R.compose(rowLens, parkingLens). Since rowLens' getter should be the last to be called.

Collapse
jreina profile image
Johnny Reina Author

Thanks for reading!

I am actually in the same boat. This post on Reddit does a good job of explaining why the composition order is the way it is. Despite that post, I still have a hard time conceptualizing this idea.

Collapse
olalonde profile image
Oli Lalonde

Thanks, glad to know I'm not crazy :)