Replies: 2 comments
-
The following example is about dev tooling that would help writing code using I often find myself writing a Vaguely, I'll have a situation like this: pipe(
// The input is of type A, and the way this is used in the rest of my code, it's fixed
// do some computations
// I often write this to inspect what type I have
// Here, say I have something like Either<string, ((_: A) => Task<ReadonlyNonemptyArray<A>>>
a => a,
// Now I just have to do some various sequence(), flatten(), toArray(), mapLeft()s to convert the current value to the known output type
// The way this function is used, the output has to be (_: A) => TaskEither<[A, string], ReadonlyArray<A>>
) The exact types are contrived, but I find myself in this situation often. When I find myself here, I dream of using an AI that understands the types, and some basic functional programming patterns to autocomplete this for me |
Beta Was this translation helpful? Give feedback.
-
Another idea: can GPT write the documentation site? The serie of guides you've written on dev.to are great because they provide motivation and real life examples. The documentation site is great once you already have that background, and are just looking up the exact types, or the exact name of a function. If GPT could write the documentation site, it could achieve both in one place. It can provide an example usage of the This would be most beneficial when Typescript forces the type-level stuff to get complicated, like with the |
Beta Was this translation helpful? Give feedback.
-
I opened this discussion to share ideas, prompts, and tips on how to use ChatGPT as a aid for development and understanding of the fp-ts APIs.
Beta Was this translation helpful? Give feedback.
All reactions