title: With AMD modules, when (or why) is it OK to use require() within define()?
body: <p>My understanding of AMD modules (using for example RequireJs or curl.js) is:</p>
  
  <p><code>require()</code> is used to asynchronously load different modules and when loaded then the callback fn is executed.</p>
  
  <p>And to define a module, you would have separate scripts that use <code>define()</code></p>
  
  <p>But I've seen some modules use <code>require()</code> inside their function definition, e.g.</p>
  
  <pre><code>define([a, b, c], function(i, ii, iii){ 
      require([d, e, f], function(d, e, f) {
          // do some stuff with these require()'d dependancies
      })
      /* rest of the code for this module */ 
  }) 
  </code></pre>
  
  <p>But I find this confusing because I would have thought that if a module has dependancies then they should be passed through via the main <code>define([dependancies], fnDefinition)</code> function and not within it via <code>require()</code> as per the above example is doing.</p>
  
  <p>Is there a reasoning behind this?</p>