Grammar as Functions [CF Article]

Summarizing/commenting on a few points from the article:

A function takes an input and produces an output. Grammar concepts do the same thing.

Each word is a function. The function takes words as inputs and outputs a noun, modifier, or finite clause. For example, all prepositions follow the same pattern as functions: input a noun and output a modifier.

In a grammar tree, the inputs words to the function word are the children of the function. A verb-function takes as inputs its subject and object. The function word is the root and the inputs are dependents. The whole branch of the tree, with the function word and all dependents grouped together, are the output of the function.