Allow building lists via sums and products, not just []
and ::
#281
Labels
C-Moderate Effort
Should take a moderate amount of time to address.
S-Moderate
Moderate importance
U-Desugaring
U-Language Design
U-Standard Library
Z-Feature Request
Z-Pedagogy
Z-Research Project
It seems a bit inconsistent that all other recursive types will be built directly from sums and products, and use
left
,right
, and tuples for construction and pattern-matching, but the built-in list type has[]
and::
as constructors. It's worth thinking carefully about the pedagogy here.Probably one would introduce sets first, and set operations like sums and product, then start making recursive type definitions, using lists as a first example. In which case this could make a lot of sense. Probably we still want
[x,y,z]
as built-in syntax sugar, though...The text was updated successfully, but these errors were encountered: