Skip to content

Instantly share code, notes, and snippets.

@briandk
Last active November 17, 2016 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save briandk/af8719151e061095509cbd812438d6a3 to your computer and use it in GitHub Desktop.
Save briandk/af8719151e061095509cbd812438d6a3 to your computer and use it in GitHub Desktop.
How I explained to Lauren the difference between a function and its invocation

$$ f(x) = x + 3 $$

y = x + 3

function f turns x into x + 3

we apply function f by saying f(something)

f = function (x) { return(x + 3) }

f   # gives us the dictionary definition of addThree 
f(something) # *applies* f to something

original text:

f(x) = x + 3

y = x + 3

function f turns x into x + 3
we apply function f by saying f(something)

function addThree

f
f()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment