Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type PartialFunction #8

Open
pawaclawczyk opened this issue Sep 13, 2017 · 0 comments
Open

Type PartialFunction #8

pawaclawczyk opened this issue Sep 13, 2017 · 0 comments
Labels
Milestone

Comments

@pawaclawczyk
Copy link
Owner

Type partial function represents a function which is undefined for some elements of the domain.

Example

f(x) = 42 / x is not defined at x equal 0

Minimal interface

interface PartialFunction
{
    public function isDefinedAt($x): bool;
    public function __invoke($x);
}

Maybe some additional logic and encapsulation in trait could be a good idea.
TDB

@pawaclawczyk pawaclawczyk added this to the 1.0.0 milestone Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant