Discussion: Add total indexing function to Data.Sequence
David Feuer
david.feuer at gmail.com
Sun May 29 22:28:25 UTC 2016
I don't like that bikeshed color much either. Go ahead and suggest
something else.
On Sun, May 29, 2016 at 6:12 PM, Ivan Lazar Miljenovic
<ivan.miljenovic at gmail.com> wrote:
> On 30 May 2016 at 07:21, David Feuer <david.feuer at gmail.com> wrote:
>> Data.Sequence offers
>>
>> index :: Seq a -> Int -> a
>>
>> which throws an error if the index is out of range. I'd like to add
>> something like
>>
>> indexMay :: Seq a -> Int -> Maybe a
>
> +1
>
> (I personally don't like the "May" prefix used for functions like this
> as I don't find it very readable, but not enough to argue over the
> colour of the bikeshed ;-)
>
> --
> Ivan Lazar Miljenovic
> Ivan.Miljenovic at gmail.com
> http://IvanMiljenovic.wordpress.com
More information about the Libraries
mailing list