3 ms·
I'm not sure how specific to Haskell this actually is, though. Think of templates in C++ (esp. template functions) or generics in Java. You use T or whatever as
by wonderzombie 14y ago
I'm not sure how specific to Haskell this actually is, though. Think of templates in C++ (esp. template functions) or generics in Java. You use T or whatever as a placeholder for actual types. Any time you need more than one type, you're forced to make a similar decision about how to describe a type about which you know very little.
It's is a heck of a lot more concise than either of those, though. Might this be the actual stumbling block? You're saying a lot about map -- in a very precise way, mind you -- without writing a lot.
- prof_hobart 14y agoC++ templates and generics are relatively advanced features though. I wouldn't be expecting to teach them in lesson 2 of the langauge. And what you would call a parameter in a production app is not necessarily the same you'd call it in a tutorial.