> A function can be seen as a machine that takes in value and gives you back another value. It is what we use in maths to map numbers (input) to other numbers (output).
That's absolutely wrong (mathematically). A function is a relation between two sets, where one value from the first set is related to at most one value from the second set.
It's kind of weird to read discussions on how "functions in programming languages are weird because they're not functions in the mathematical sense", but then you see how for most people a function denotes a machine that performs work in time (all physical concepts), rather than the idealised mathematical definition. Doubly weird when the author is someone trying to explain calculus and has presumably sat through a lot of high-level mathematics classes.