What do you assume when you see fromListN in a library?

Bardur Arantsson spam at scientician.net
Fri Feb 28 15:02:07 UTC 2020


On 28/02/2020 04.40, Zemyla wrote:
> I'm kind of the opposite. I think the number given to fromListN should
> be a "size hint", not a redundant coding of the size of the list given.
> 

One option would be to have a

   data Size = Hint Int
             | Exact Int

as a parameter and let the user specify desired behavior. (Assuming it's
easy to accomodate either.)

Regards,



More information about the Libraries mailing list