Skip to content

mapWithIndex should reuse Data.FunctorWithIndex.mapWithIndexArray #232

Description

@JordanMartinez

This library defines the monomorphic mapWithIndex function as a zipWith function on the initial array and an indices-array constructed using the input array's size. I'd guess it's actually slower than just using FunctorWithIndex.mapWithindex.

The actual monomorphic and dictionary-less mapWithIndex FFI is defined in foldable-traversable via mapWithIndexArray. Perhaps the mapWithIndexArray could be exported in FunctorWithIndex, such that we can re-export here under the name mapWithIndex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions