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

Reply via email to