In my learning curve of Haskell, I am trying to find correspondent pairs of features in either language:
Haskell concept <=> Approximate equivalent C++ Concept
Data (Record syntax) <=> Class/Struct
Typeclass <=> Abstract Class (Interface in Java)
Type Constructor <=> Template
Functor <=> Iterable class (https://stackoverflow.com/questions/8164567/how-to-make-my-custom-type-to-work-with-range-based-for-loops)
fmap <=> std::transform
lambda <=> lambda (>= C++11) (without capture mecanism)
type <=> alias ( >= c++11), typedefs
type inference <=> type inference ( >= c++11 auto)
module <=> library
Maybe <=> std::optional (>= C++17)
Either <=> std::variant (>= C++17)
Higher Order Function <=> functions taking one or several function pointers or std::function as parameter
Tuples <=> std::tuple (>= C++11)
Haskell Concepts with no equivalence
Pattern matching
IO
List comprehension (C++ std::initializer_list ?)
Do you see important concepts that I should add in this list or obvious errors?