2 ms·
> Personally, I write the type signature before I write the function implementing it. It is a nice thing to look at as you are writing the function; it keeps yo
by anamax 17y ago
> Personally, I write the type signature before I write the function implementing it. It is a nice thing to look at as you are writing the function; it keeps you focused on what to do. Oh, and it is great documentation, that the compiler ensures is up to date -- if your function does something the type signature disagrees with, your program won't compile. Excellent!
That partitions the function definition. And it's optional. And it could be somewhere else.
And you get to argue with folks who like point-free because it's shorter.