[OpenSCAD] Openscad Indirect Functions

Lucas Vinicius Hartmann lucas.hartmann at gmail.com
Wed Oct 19 09:44:04 EDT 2016

2016-10-18 17:51 GMT-03:00 doug moen <doug at moens.org>:

> The → symbol is what's used in mathematics to describe functions, eg f :
> x → x².

I am not really sure, but If I remember correctly the usage of the arrow in
math is not exactly that. It describes a property of the function, not the
function itself.

The arrow is used pointing to a SET that contains all possible answers for
the function, but does not specify what is the answer for a partigular
input. Basically it is equivalent to the return type of a function
prototype in C/C++.

If, for instance, we have a cubic function given by

f(x) = x*x*x

Then f(x) may return any real number, so the result set is all real

f(x) -> R     (Imagine the stylish R for real numbers here)

If f2(x) was a square function, then only positive real numbers could be
returned, so...

f2(x) -> R+

That said, the usage of arrows in openscad or programming languages is up
to the developers. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20161019/710f029d/attachment-0002.html>

More information about the Discuss mailing list