DEV Community

Discussion on: Not a Function

Collapse
 
curtisfenner profile image
Curtis Fenner

As to the circle example being a function or not, I would point back to the definition. Functions are relations between a domain and a range (aka codomain). If your range is the set of numbers, y in terms of x is not a function. If your range is sets/lists/1 or 2 tuples, then it could be. There's nothing that prevents a function being defined R -> R \union R² -- this is still a totally pure mathematical concept.

Collapse
 
stereobooster profile image
stereobooster

I kind of arrived to the same conclusion

Well, I would say that it is still a function (y has a single output - list)

But this idea, if this a function or not depends on how you define codomain makes even more sense after you said it.