Skip to content

Should withDefault be available on lenses with a polymorphic source? #1340

Description

@steinybot

It seems to me like the extension methods that are on LensSyntax et al that use andThen (such as withDefault ought to only require A =:= B and not S =:= T. I would expect those to be on something like:

final case class LensTargetSyntax[S, T, A](private val self: PLens[S, T, A, A]) extends AnyVal {
  ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions