gleam-lang / stdlib

🎁 Gleam's standard library
https://hexdocs.pm/gleam_stdlib/
Apache License 2.0
496 stars 178 forks source link

Inaccurate documentation for `list.take` #686

Closed k4g4 closed 3 months ago

k4g4 commented 3 months ago

it looks like the documentation for list.take claims it "does not copy the list", even though it actually has to copy the list twice (once to take the first n items, and once to reverse it). This was probably a mix-up with list.drop's documentation being inappropriately copied over. https://github.com/gleam-lang/stdlib/blob/341a71049ad765f8788af497969efbb94aba0bab/src/gleam/list.gleam#L585

lpil commented 3 months ago

A copy paste mistake I wager. Thank you