inato / fp-ts-cheatsheet Goto Github PK
View Code? Open in Web Editor NEWFP-TS Cheat Sheet
Home Page: https://inato.github.io/fp-ts-cheatsheet/
FP-TS Cheat Sheet
Home Page: https://inato.github.io/fp-ts-cheatsheet/
Do-notation
map
/ chain
sequence
/ traverse
The goal is to document this pattern
First of all, I would like to thank you for posting this cheat sheet! It's been really useful for me as a reference.
What I have noticed, is that the guide does not give much info on the Do Notation. It is only briefly shown without much explanation in the last paragraph: https://github.com/inato/fp-ts-cheatsheet#-call-in-parallel
I think that it would be useful to have more details on the Do Notation, and this could be easily achieved by putting there a link to this page: https://gcanti.github.io/fp-ts/guides/do-notation.html
What do you think?
Hey!
If I use getOrElse
on IOEither
I have to provide IO
type value as a Left result, cannot be just null
.
What I do now, I convert IOEither
to TaskEither
with fromIOEither
function and then just run and await for TaskEither
.
But that makes the whole pipe
async. Any other way to get a value from IOEither
without async?
It appears that the fold example has a missing closing parenthesis:
const doubleOrZero = fold(
(eitherError: string) => {
console.log(`The error was ${eitherError}`; //missing closing parenthesis
return 0;
},
(value: RawStudentRowValues) =>value, // on right branch
);
import { either } from "fp-ts"
That's how it should be written.
Is there a more concise way to go from Array<Option.Some<A>> => Array<A>
than: Array.map(({ value }) => value
?
Line 730 in f73c697
I may be wrong, but I think that traverse takes the data as the very last argument
fold is deprecated, match is a new name
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.