title: Access lapply index names inside FUN
body: <p>Is there a way to get the list index name in my lapply() function?</p>
  
  <pre><code>n = names(mylist)
  lapply(mylist, function(list.elem) { cat("What is the name of this list element?\n" })
  </code></pre>
  
  <p>I asked <a href="https://stackoverflow.com/questions/9469504/access-and-preserve-list-names-in-lapply-function">before</a> if it's possible to preserve the index names in the lapply() <em>returned</em> list, but I still don't know if there is an easy way to fetch each element name inside the custom function. I would like to avoid to call lapply on the names themselves, I'd rather get the name in the function parameters.</p>