Update docs for "apply" and add an example