ceylon/ceylon-spec — Issue #145: Redefine if (nonempty xs) to mean if (is Some<T> xs)
Author: gavinking
Created: 2012-01-22 16:07:14+00:00
State: open
Labels: high priority, improvement

We can now go ahead and generalize the definition of `if (nonempty ...)` to any subtype of `FixedSized`. It should be basically equivalent to `if (is Some ...)` where `T` is the type argument to `FixedSized`. For the special case of `T[]`, this conveniently narrows to `Sequence`, which is what we need.