-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Labels
status: needs more infoThis issue needs more info before any action can be done.This issue needs more info before any action can be done.
Description
Although a little unwieldy, the NonEmpty version of span
should really have a signature like this, to preserve the non-emptyness (the current version loses it):
span :: forall a.
(a -> Boolean) ->
NonEmptyList a ->
Either { init :: List a, rest :: NonEmptyList a } { init :: NonEmptyList a, rest :: List a }
Or maybe it should be a new function?
Edit: Just realized it's probably just as easy to check whether init
is empty and use the original list instead of rest
in that case. I'll leave this here anyway
Metadata
Metadata
Assignees
Labels
status: needs more infoThis issue needs more info before any action can be done.This issue needs more info before any action can be done.