Hi Ketil, ... another thing I didn't really have time for ...
My preference would be to follow the naming conventions of vector. Mostly because vector is widely-used and might become the new basis for bytestring (is this right? I'm not sure). So, have slice :: Offset -> Length -> s -> s maybe Length needs to be a type family? Being Int or Int64? Gruss, Christian * Ketil Malde <ke...@malde.org> [03.01.2013 11:36]: > > Ketil Malde <ke...@malde.org> writes: > > > Christian Höner zu Siederdissen <choe...@tbi.univie.ac.at> writes: > > > >>> 'slice' would select a substring of a sequence, delimited by the > >>> offsets. (Inclusive, I guess?) > > >> start + length > >> vs. > >> start + stop > >> coordinates? Vector uses start + length. > > > Hm, yes. That is: please discuss! My first thought was the latter, but > > consistency and ease of use will be important. > > I'd like to push out biocore 0.3 with classes and stuff (as well as some > dependent packages), but we need to resolve this first. > > We have several alternatives here: > > slice :: s -> Offset -> Offset -> s -- start and end, inclusive or > exclusive > slice :: s -> Offset -> Offset -> s -- start and length > slice :: s -> Offset -> Int -> s -- start and length, but different > types > > Then there's the standard set of chopping operators, with and without > predicates: > take, drop, span, takeWhile, etc. And vector supports unsafeSlice for > speed. > > My current sentiment is to drop this for now, the design space is pretty > cluttered, and it's probably easier to add stuff later than to take it > out. Thoughts? > > -k > -- > If I haven't seen further, it is by standing in the footprints of giants > _______________________________________________ > Biohaskell mailing list > Biohaskell@biohaskell.org > http://malde.org/cgi-bin/mailman/listinfo/biohaskell
pgpgieAFAXoBn.pgp
Description: PGP signature
_______________________________________________ Biohaskell mailing list Biohaskell@biohaskell.org http://malde.org/cgi-bin/mailman/listinfo/biohaskell