Skip to content

add generic traverse method, a la Data.Traversable #69

Description

@cpeikert

Unboxed vectors can't be Traversable due to the Unbox constraint on the element type, but it would be very useful if there were an analogous generic traverse method:

traverse :: (Applicative f, Vector v a, Vector v b) => (a -> f b) -> v a -> f (v b)

Even better would be if it were efficient, i.e., didn't just convert to and from lists (like the Traversable instance for boxed vectors does) -- but I'm not sure if this is even possible.

sequence comes close, except that it requires Monad m and Vector v (m a), which will typically not hold for unboxed vectors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions