<div dir="ltr">+1 from me on 'lookup' and '!?'. Personally, I found the '!?' name intuitive immediately when I first saw it in Vector, so I'm a fan of it. Not as sure about 'lookup' because what it does on lists and maps is different from indexing (ie it works with key-value pairs), but it does scan significantly better than 'indexMay'.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 31, 2016 at 1:38 AM, wren romano <span dir="ltr"><<a href="mailto:winterkoninkje@gmail.com" target="_blank">winterkoninkje@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, May 29, 2016 at 6:12 PM, Ivan Lazar Miljenovic<br>
<<a href="mailto:ivan.miljenovic@gmail.com">ivan.miljenovic@gmail.com</a>> wrote:<br>
</span><span class="">> On 30 May 2016 at 07:21, David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br>
>> Data.Sequence offers<br>
>><br>
>> index :: Seq a -> Int -> a<br>
>><br>
>> which throws an error if the index is out of range. I'd like to add<br>
>> something like<br>
>><br>
>> indexMay :: Seq a -> Int -> Maybe a<br>
><br>
> +1<br>
><br>
> (I personally don't like the "May" prefix used for functions like this<br>
> as I don't find it very readable, but not enough to argue over the<br>
> colour of the bikeshed ;-)<br>
<br>
</span>I too am +1 for the total function, but -1 for the "May" naming scheme.<br>
<br>
I'd go with "lookup", since that's what (Int)Map does.<br>
<br>
I'd also be fine with Vector's (!?) if folks really want a symbolic<br>
name. (IME this function tends to work better with an alphabetic name,<br>
ymmv)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Live well,<br>
~wren<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>