instance Alternative ZipList
The paper "From monoids to near-semirings:
the essence of MonadPlus and Alternative" mentions
Perhaps surprisingly,
ZipLists have anAlternativeinstance. Like theAlternativeinstance forMaybe, the one forZipListhas a left bias.instance Alternative ZipList where empty :: ZipList a empty = ZL [] (<|>) :: ZipList a -> ZipList a -> ZipList a ZL xs <|> ZL ys = ZL (xs ++ drop (length xs) ys)
Has this been considered for base?
Edited by Icelandjack