map(A,func)
, but that one's for arrays only. How would you go about abstracting it to different collection types like trees and hash-maps? Also is the func
just a (void *)
pointer, or does its type actually get checked when it's applied to func(A[i])
? Most of method resolution happens at compile time as opposed to C++ where there's a runtime v-table indirection for every virtual call.No polymorphism, no static linking to binaries. Haskell is garbage.