title: Nested functions on bash
body: <p>I have a function which expect to receive another function to be executed</p>
  
  <pre><code>  a(){
       function=$1
       echo "common log! $function"
       $function --&gt; run the function
    }
  </code></pre>
  
  <p>What I want is to pass that function argument in my function as a nested  function</p>
  
  <pre><code>   b(){
         a f(){ echo "nested function b" }
         echo "since I´m doing more things here"
     }
  
     c(){
         a f(){ echo "nested function c" }
         echo "since I´m doing more things here"
     }
  </code></pre>
  
  <p>But seems like the nested function f cannot be done on bash</p>
  
  <p>Any suggestion about how to accomplish this?</p>