Fp-ts: Meaning of the S, R, E, and A type parameters

Created on 23 Apr 2020  路  2Comments  路  Source: gcanti/fp-ts

馃摉 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.

Most helpful comment

If I recall correctly

  • A: just the first alphabet letter
  • E: Error (for example Either<E, A>)
  • R: not sure, Resource? (for example ReaderTaskEither<R, E, A>). Haskell uses r too
  • S: State (for example StateReaderTaskEither<S, R, E, A>)
  • URI: Unique Resource Idefntifier (but Uniform Resource Identifier would be pertinent as well IMO)

All 2 comments

If I recall correctly

  • A: just the first alphabet letter
  • E: Error (for example Either<E, A>)
  • R: not sure, Resource? (for example ReaderTaskEither<R, E, A>). Haskell uses r too
  • S: State (for example StateReaderTaskEither<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/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jollytoad picture jollytoad  路  4Comments

vicrac picture vicrac  路  4Comments

bobaaaaa picture bobaaaaa  路  4Comments

denistakeda picture denistakeda  路  4Comments

bioball picture bioball  路  4Comments