Adds a named function

/cc @machty