Snippets tagged sequences skip

  • Skip that is safe when not enough lines

    A version of Seq.skip which doesn't throw an exception if there are fewer lines in the sequence than you have asked to skip.

    2 people like this

    Posted: 12 years ago by Kit Eason

  • Continue sequence after applying Seq.takeWhile, skip, take, etc

    Sometimes you need to take more elements from a sequence, e.g. look at This solution allows fetching elements from the same sequence after applying takeWhile, skip, take and other sequence functions. However, need to remember to call function with right parameter: use 'true' to include current element into result sequence (after takeWhile for example)

    2 people like this

    Posted: 4 years ago by Ruslan Enikeev