|
|
|
|
|
by thaumasiotes
249 days ago
|
|
> Functions map members of a set A to members of a set B. These can simply be Cartesian products whose members are tuples. Well, a function can't be a Cartesian product unless set B has cardinality 1. It's perfectly coherent to view a function as a set of tuples, but it's not legal for that set to contain two tuples (a, b) and (a, c) where b ≠ c. > In my dream PL syntax a function call would be a function name followed by a tuple, and that tuple would be no different than the tuples you would use in any other part of the program (and so you could use all the tuple manipulation library goodies). This already exists. For example, that's how `apply` works in Common Lisp. https://www.lispworks.com/documentation/HyperSpec/Body/f_app... (apply #'+ '(1 2)) => 3
|
|