2 ms·
They should have told you write f = (x -> x^2) or so.
by eru 15y ago
They should have told you write f = (x -> x^2) or so.
- JadeNB 15y agoI think it's better pedagogically just to acknowledge that, in common mathematical discourse, "the squaring function" doesn't have any symbolic name. Perhaps it's more illustrative to think of, for example, `f(x) = ln(x)` (the value of a function) versus `f = ln` (the function itself); and a good (college) mathematics teacher will make this distinction.
- perfunctory 15y agoThey could also tell me to write (= f (-> (x) (^ x 2))). Then we would all be using lisp and laughing and those few developers who would using that weird infix notation.
- eru 15y agoWhile I like S-Expressions for computers, even in that small example the parenthesis are a bit excessive. Keep in mind that mathematics is mostly written by hand on a black board.