Skip to content

Can you memoize as TaskEither? #1667

Answered by imcotton
florianbepunkt asked this question in Q&A
Discussion options

You must be logged in to vote

IORef 1 is easiest hack to place inside getApiResult.
StateReaderTaskEither 2 is fp-ish way to go.

Footnotes

  1. https://gcanti.github.io/fp-ts/modules/IORef.ts.html

  2. https://gcanti.github.io/fp-ts/modules/StateReaderTaskEither.ts.html

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@florianbepunkt
Comment options

@mlegenhausen
Comment options

@florianbepunkt
Comment options

Comment options

You must be logged in to vote
1 reply
@imcotton
Comment options

Answer selected by florianbepunkt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants