13 ms·
One thing that's neat is that with functions as exponentials (A^B being the type of functions taking a B and returning an A) all of the identities you learned i
by dllthomas 5y ago
One thing that's neat is that with functions as exponentials (A^B being the type of functions taking a B and returning an A) all of the identities you learned in highschool algebra made up of only addition, multiplication, and exponents (division and subtraction don't quite have exact analogs) hold as isomorphisms. Writing the functions to take you in either direction can be an interesting exercise.
For instance, (A^B)^C = A^(B*C):
(f) => (b, c) => f(c)(b)
(f) => c => b => f(b, c)
which, of course, is currying and uncurrying.