
17 Mar
2015
17 Mar
'15
2:05 p.m.
On Tue, Mar 17, 2015 at 05:26:39PM +0000, Kelong Cong wrote:
I have a function that takes a list as its parameter. The list must always have the same length, for example 16. Instead of producing a "Nothing" or bottom out when an invalid list is supplied, are there ways to verify this at compile time? If not, are there alternative data types that has this kind of functionality?
Wouldn't a gigantic 16-sized tuple solve the matter (or any datatype with 16 accessors)? What functions are you using on the list?