fp-ts
fp-ts copied to clipboard
Meaning of the S, R, E, and A type parameters
📖 Documentation
Where do the letters S, R, E, and A that are used as type parameters throughout fp-ts come from? I understand what they're for and how higher kinded types work in fp-ts, but why those specific letters? I can make a guess for A, but the rest seem kind of random, at least to a native English speaker with no prior functional programming experience.
Also, what does URI stand for? I keep thinking Uniform Resource Identifier, but it doesn't follow the spec so I'm not really sure.
Apologies if this isn't the right place to ask. I can't find an answer anywhere, and individual letters are impossible to search for. Feel free to close whenever.
If I recall correctly
A: just the first alphabet letterE: Error (for exampleEither<E, A>)R: not sure, Resource? (for exampleReaderTaskEither<R, E, A>). Haskell usesrtooS: State (for exampleStateReaderTaskEither<S, R, E, A>)URI: Unique Resource Idefntifier (but Uniform Resource Identifier would be pertinent as well IMO)
This is a great question and response. Can we have this added to the docs under guides?
https://gcanti.github.io/fp-ts/guides/
todo: label as docs, implement
We should have a list of letters to come next. Currently I've seen for 3.0 we have E1 and E2 when there are duplicates, which should also be documented.