Hacker News new | ask | show | jobs
by saosebastiao 4191 days ago
Can someone help me bridge the gap between this understanding of the definition of functor and the ocaml version?

In ocaml, a functor is a module that takes another module as a parameter. In this, a functor is a type that implements the map method. Is there something I'm missing that explains how both of them are functors?

1 comments

The simple explanation is that the word functor is being used for two different concepts.

I found this question on Stackoverflow.

http://stackoverflow.com/questions/16353066/how-are-functors...