purescript/purescript-lists

List.Lazy insertAt, modifyAt, updateAt, deleteAt, alterAt members behave differently to List and Array

Opened this issue · 3 comments

They always return a List a even when the index is out of range, whereas the other modules return a Maybe (List a) or Array (List a) for when the operation has no effect.

The reason is that we don't have a lazy Maybe. We would need at least to return Lazy (Maybe (List a)) unless we wanted to force the head element.

Yeah, I wondered if this one might be problematic. It can always go ignored if we decide it's not worth it 😄

This needs further discussion.