News for hackers. Stuff that matters.
Re:Ask HN: How to be fluent in functional language speak? by quickthrower2 on Tuesday May 05, 2020 @06:24AM (#23078412)
I found it equally tough because while there are a lot of resources to cover the basics and get you coding in Haskell there isn’t much to bridge the middle ground from there to the level the deep enthusiasts and experts are at. All I can say is keep trying and reach our for help on IRC channels or at a local functional programming meetup (and by local these days you could remote in to any meetup you like!). They’ll be people happy to help.

It’s been a while since I’ve dabbled with Haskell but I believe type constructors take a type and return a type (like List takes Int and returns List Int) so an abstraction over them might be an m where say m is a monad and it takes an a and gives you m a. m is an abstraction because it could be anything. A List, or Either, or State etc.

Re:Ask HN: How to be fluent in functional language speak? by dllthomas on Tuesday May 05, 2020 @05:45PM (#23085445)
> type constructors take a type and return a type

Ordinary constructors, which everyone here is familiar with, construct values. They may take some arguments, which are themselves values.

A type constructor constructs types. It may take some arguments, which are themselves types. List is a great example of a type constructor with one argument. `Bool` is a type, and arguably a type constructor with no arguments. `Either` is a type constructor with two arguments.

In C++, `Pair` is a type constructor with two arguments; although there are more constraints on how you can use it (or at least were last time I delved deep in C++).

An example of "abstraction over type constructors" would be something that lets you pass in a type constructor as an argument, giving different behavior (whether parametric or ad-hoc - sorry, more jargon...) depending on what you pick.