Single-Argument Functions and Abstraction
July 19, 2020

Real computations accept structured situations and produce structured consequences. Teach that shape from the beginning and multiple inputs, tuples, records, vectors, matrices, tensors, APIs, and physical ports become one continuous idea instead of a series of advanced exceptions.

Interface Shape Carries Meaning

A function that moves a point needs coordinates. A controller needs state, a target, and measured input. A circuit exposes data, clocks, enables, and configuration. The roles among those values define the problem as much as the calculation does.

Tuples and product types can package many arguments into one formal object. Currying can transform a multi-argument function into a chain of single-argument functions. Both techniques preserve the underlying shape; good notation should reveal it rather than make learners recover it later.

Multiple Inputs Make Abstraction Concrete

Named inputs tell a caller which value acts as source, destination, coordinate, gain, limit, predicate, clock, or configuration. Structured outputs can return a result together with state, error, derivative, provenance, or a next action.

That explicit structure makes computation easier to compose and test. It also connects elementary arithmetic directly to multivariable calculus, partial differential equations, tensor algebra, data models, and software interfaces.

Reform the First Lesson

Children already understand actions with several participants and several results. Education can name those relationships early, use visual grouping to keep them clear, and let programming tools handle notation that once made generality expensive to teach.

Start with inputs, outputs, and roles. The single-argument function then becomes one elegant case inside a richer and more intuitive theory of abstraction.

Originally posted on LinkedIn

Brian Greenforest · (2020-07-19 14:35:37 UTC)

Open the original LinkedIn post · LinkedIn activity 6690625133100572672

LinkedIn status when archived: Visible to anyone on or off LinkedIn.

Imagine learning Python constrained with the use of only "single argument and single return value" functions. No lists allowed. An exception is a vector or a matrix can be return value. No matrices in arguments, please. Standard Python syntax becomes unavailable this way. Class methods don't work anymore (remember "self" as the first argument?) Abstraction is a dream impossible with this single-argument approach. Somehow, we agree to study mathematics based on functions of single argument, and call it a core. Multivariable calculus, PDEs, tensors, multilinear algebra become study subjects of undergraduate and PhD level mathematics. A graduate student, re-learns addition and multiplication, discovering that MULTIPLE ARGUMENTS are a norm. Teachers were hand waving until you "grow up" because it was "too messy" and "too general" to introduce you to the BASIC "abstract" concepts. It's not 1700s anymore. We have computers and abstraction. Teach students multiple inputs-multiple outputs in the 1st grade, please... I don't believe that it's an education system conspiracy. We need to reform it. #reformeducation