Closed jeiea closed 4 years ago
The RIO.List module provides a few different list indexing functions which are total. RIO.List.Partial provides the partial (and not recommended) !!
operator.
Could not (!!)
be total for compatibility? Then I have to define one myself or use partial (!!)
. Thanks for quick reply.
!!
cannot be total. What would the result of [] !! 4
be?
Nothing?
I just wanted to receive Maybe
type.
We try to match function and operator names and signatures from base, which is where the current setup comes from.
On Sat, Nov 16, 2019, 9:16 PM jeiea notifications@github.com wrote:
Nothing? I just wanted to receive Maybe type.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/commercialhaskell/rio/issues/202?email_source=notifications&email_token=AAAMCBZGSPRMQNXDL3PLCADQUAIT5A5CNFSM4JOFL232YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHUICY#issuecomment-554648587, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMCB7WIIOXSKLUVVIMJM3QUAIT5ANCNFSM4JOFL23Q .
I searched something like
(!!) :: [a] -> Int -> Maybe a
but couldn't find one. So I leave this question.