Skip to content

Instantly share code, notes, and snippets.

Created April 9, 2011 03:34
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 anonymous/911078 to your computer and use it in GitHub Desktop.
Save anonymous/911078 to your computer and use it in GitHub Desktop.
<amalloy> (doc fnil)
<sexpbot> ⟹ "([f x] [f x y] [f x y z]); Takes a function f, and
returns a function that calls f, replacing a nil first argument to f
with the supplied value x. Higher arity versions can replace arguments
in the second and third positions (y, z). Note that the function f can
take any number of arguments, not just the one(s) being
nil-patched."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment