title: Bash: pass a function as parameter
body: <p>I need to pass a function as a parameter in Bash. For example, the following code:</p>
  
  <pre><code>function x() {
    echo "Hello world"
  }
  
  function around() {
    echo "before"
    eval $1
    echo "after"
  }
  
  around x
  </code></pre>
  
  <p>Should output:</p>
  
  <pre><code>before
  Hello world
  after
  </code></pre>
  
  <p>I know <code>eval</code> is not correct in that context but that's just an example :)</p>
  
  <p>Any idea?</p>