SuaveIO/suave

Change Collections.fs functions to use the Result type instead of the Choice type

dam5s opened this issue · 2 comments

dam5s commented

I was wondering why the Choice type is used in this file:
https://github.com/SuaveIO/suave/blob/master/src/Suave/Utils/Collections.fs

I was trying to use the HttpRequest.header function and was having a hard time going up the chain to find out what was actually returned. In the end I found the Collections functions.

Is there a particular reason for the usage of the Choice type instead of the Result type for these functions? It would be a lot easier to understand the API if it was returning a Result instead.

If there is a specific reason why Result is not good enough in that case, I would really like to know. Feel free to close the issue if that's the case too.

Thanks!

dam5s commented

Oh great, thanks for the quick feedback!