Discussion: Add total indexing function to Data.Sequence

Evan Laforge qdunkan at gmail.com
Sun May 29 23:28:38 UTC 2016


I call my list version at: 'at :: (Num i, Ord i) => [a] -> i -> Maybe a'.

I also often use "lookup" as a shorthand for "returns Maybe" (and then
"get" means throws on Nothing).

On Sun, May 29, 2016 at 3:52 PM, David Feuer <david.feuer at gmail.com> wrote:
> I'm tempted to go with `lookup`, to match Data.IntMap.
>
> On Sun, May 29, 2016 at 6:35 PM, Francesco Ariis <fa-ml at ariis.it> wrote:
>> On Sun, May 29, 2016 at 06:28:25PM -0400, David Feuer wrote:
>>> I don't like that bikeshed color much either. Go ahead and suggest
>>> something else.
>>
>> safeIndex? totalIndex? Best solution would be to rename index to
>> unsafeIndex and your proposed function to index, but it's obviously
>> not practicable.
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


More information about the Libraries mailing list