Skip to content

Add take, drop, and splitAt #11

@treeowl

Description

@treeowl

The least we can do is use fromListN machinery to make take linear in the result size, which smells big-O optimal. For stack drop, I imagine we can do something more interesting, to make it linear in the number of elements dropped. For queues, I've implemented take in time linear in the number of elements taken, but I suspect we can do better than that in the case where we take most of the elements—some sort of "drop from the rear" smells better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions