Skip to content

Data.List.Linear.{take,drop} take one list element too many #484

Closed
@tomsmeding

Description

@tomsmeding

Describe the bug
Data.List.Linear.take n l takes n+1 elements from l. Data.List.Linear.drop n l drops n+1 elements from l.

To Reproduce

$ cabal repl -b prelude-linear
[...]
ghci> import qualified Data.List.Linear as L
ghci> L.take 3 "abcde"
"abcd"
ghci> L.drop 3 "abcde"
"e"

Expected behavior
They should respectively take and drop n elements.

Environment

  • OS name + version: n/a
  • Version of the code: Version 0.4.0 from Hackage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions