Skip to content

whenA and unlessA do not have lazy functions #247

Description

@diversit

Is there a reason the Boolean functions whenA and unlessA are not by-name (lazy) functions like option, xor, fold etc?
Now when using false.whenA(f) function f is evaluated even when the boolean is false. Similar for unlessA.
Is this a bug or a feature?

Functions like Option.when and Option.unless are also by-name, so I would have expected these Boolean function to also be by-name.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions