--

Awesome and really well-written article!

I'd like to just point out that throwing exceptions make a function impure, so maybe returning an Either or Maybe type could be more appropriate (or a simple error object representing your domain errors).

As an advantage, you can trust your function's signatures, because they will always show all the possible outputs (also known as total functions in the FP jargon).

--

--

Álefe Nascimento da Silva
Álefe Nascimento da Silva

Written by Álefe Nascimento da Silva

A Software Engineer who loves to learn new things.

No responses yet