Skip to content

Better version of Interpolation.list #144

@gampleman

Description

@gampleman

We could make add and delete options to be a -> Interpolator (Maybe a), with Nothing indicating their absence in the resulting list.

We should also make the list ordered by default where order would be interpolated properly.

ListCombiner is kind of dumb, we should just accept a List (Interpolator a) -> Interpolator (List a) function

Finally, we could make all the options (except id) actually optional, since

{ add = \v -> Interpolation.step Nothing [ Just v ]
, remove = \v -> Interpolation.step (Just v) Nothing
, change = \a b -> Interpolation.step a [ b ]
, combine = Interpolation.inParallel
}

would be pretty decent defaults.

Potentially we could make id optional as well and just treat everything as additions and removals without it, but that sort of seems fairly suboptimal. Or have a way to use == to figure out reorder-ing at least...

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions