Hacker News new | ask | show | jobs
by gpderetta 348 days ago
A monad would not be a template class in C++, it would a concept (more or less the c++ equivalent of an Haskell type class).
1 comments

monad like an idea - yes, it will be a concept. But a concrete monad - like list or maybe - will be a template class. Probably comment author means this
Good point. In the same way we say that a pointer is an iterator or a vector is a container, when more precisely we should say that they model the iterator concept and container concept respectively.