Going through a Twitter thread with +100 tweets is not handy at all. So here's the compilation of all the tweets for each day (so far).
#100DaysOfFP Day 03
Using Task (by @sherman3ero) instead of Promise to handle async code. Task is lazy, errors are typed and it differentiates between mapping, chaining and consuming the result.
Task: github.com/ts-task/task & github.com/ts-task/fetch
Code: codesandbox.io/s/30jm8oymx622:04 PM - 08 Jan 2019
#100DaysOfFP Day 04
Replaced the state values used to keep track of the status of the fetch with the RemoteData type. Not only the render method is much simpler but all the states are consistent as we cannot have combinations that don't make sense.
Code: codesandbox.io/s/q7yl9v6qn422:28 PM - 09 Jan 2019
I like how you handle effects in standalone functions instead of methods that are tied to a class. Those functions can be tested very easily in isolation and the runtime, React in this case, guarantees they will work in the context of the component.08:34 AM - 11 Jan 2019
#100DaysOfFP Day 06
Here's the implementation of RemoteData. Very simple, just a wrapper to encapsulate the different states of fetching data.
Will work on adding tests to make sure it satisfies the laws in following days.
Code: github.com/gillchristian/…22:11 PM - 14 Jan 2019
The last case fails because it cannot assign (bind) 1 and 2 to X, since variables are immutable and can only be bound once.21:22 PM - 13 Aug 2019
That was Day 21 🤦♂️21:09 PM - 17 Sep 2019
False alarm, it takes ~10s when running on GHCi. But building with compiler optimizations and running that takes ~800ms. Which is for sure good enough 🎉21:30 PM - 02 Dec 2019
@Catawiki_Tech #100DaysOfFP Day 30
The last one for this year 🎉
A simple CLI to watch a command until it's output matches some pattern. Still WIP.
Learned about handling processes, parsing CLI args/flags and clearing terminal output.
github.com/gillchristian/…19:16 PM - 31 Dec 2019
@Catawiki_Tech #100DaysOfFP Day 33
Applicative instance of (->) functions allows to apply an argument (x) to two unary functions (f & g) and then apply the result of each to a third function (h) to produce the result (y).
Thanks @mvaldesdeleon for the explanation and the nice graph!09:52 AM - 18 Feb 2020