Problem with function to dynamically define modules

  1. You probably want to use macros rather than functions.
  2. You need to use unquote within a quoted context.