title: apply over nested functions
body: <p>This is not really a problem, but I'm wondering if there is a more elegant solution:</p>
  
  <p>Lets say i have a vector <code>vec &lt;- rlnorm(10)</code> and I want to apply a not vectorized function to it, e.g. <code>exp</code> (ignore for the moment that it is vectorized), I can do</p>
  
  <pre><code>sapply( vec, exp )
  </code></pre>
  
  <p>But when the function I want to apply is nested, the expression becomes directly less simple:</p>
  
  <pre><code>sapply( vec, function(x) exp( sqrt(x) ) )
  </code></pre>
  
  <p>This happens to me all the time with the <code>apply</code> and <code>plyr</code> family.</p>
  
  <p>So my question is, is there in general an elegant way to nest (or pipe) functions without defining explicitly an (anonymous) function <code>function(x){...}</code>? Something like</p>
  
  <pre><code># notrun
  sapply( vec, sqrt | exp )
  </code></pre>
  
  <p>or similar.</p>