-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
C-Moderate EffortShould take a moderate amount of time to address.Should take a moderate amount of time to address.S-Nice to haveMinor importanceMinor importanceZ-Feature Request
Description
Disco has strings (as List(Char)
) but no easy way to turn values into strings. For example, suppose we wanted a function like
reportWidgets : N -> List(Char)
reportWidgets n = append("There are ", append(??? n, " widgets"))
There is currently nothing appropriate to put in place of ???
. We could manually write our own function to turn natural numbers into strings but it would be tedious and inefficient.
I propose adding some function like format : a -> List(Char) [format a]
where format
is a new constraint for types that can be formatted. Alternatively we could just make it defined on all types, format : a -> List(Char)
, but have it return some default for types whose values can't be converted.
Metadata
Metadata
Assignees
Labels
C-Moderate EffortShould take a moderate amount of time to address.Should take a moderate amount of time to address.S-Nice to haveMinor importanceMinor importanceZ-Feature Request