groostav
02/01/2017, 12:01 AMvararg
that means one or more rather than zero or more?ianbrandt
03/10/2023, 9:37 PMephemient
03/11/2023, 1:20 AMfun f(args: NonEmptyList<T>)
f([1, 2, 3])
I think it would be a better optionianbrandt
03/11/2023, 2:14 AMvarargs+
could be represented by a new NonEmptyArray
type, but I agree that collection literals would be related and should be considered.groostav
03/15/2023, 10:10 PMephemient
03/15/2023, 10:15 PMvararg+
wants to constrain callers to provide at least one argument
contracts do not constraint callers. they declare certain guarantees about the callee's behavior to the caller