-
Notifications
You must be signed in to change notification settings - Fork 140
Description
My interpretation of slice, which may not be the universal one, but I believe reflects a common intent, is when I write
import Data.Vector as V
...
V.slice startIx runlength veci'm always like "what?! I wanted to write an inclusive coordinate interval"
V.slice startIx endIx vecif the user's semantics is "i want/need this interval", throwing an error and promptly aborting is the only option i can see for the current type signature when that interval doesn't exist.
I'd even go further, and suspect that currently
-
slice with the
base indexandrunlengthapi we currently have is arecurrent gotcha -
any semantics that doesn't relate to the coordinate interval one might be problematical (though, there are some cut semantical tricks if we think about the coordinates in a modulus sorta sense, a la -1 et al in python sequences, but thats not the current topic)