Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to set a dynamic var in another namespace
  2. (def ^:dynamic lobos.migration/*migrations-namespace* 'gb.install.migrations)
  3.        
  4. (binding [lobos.migration/*migrations-namespace* 'gb.install.migrations]
  5.   ;; binding is in effect here in the body of the binding form
  6.   )
  7.        
  8. (set! lobos.migration/*migrations-namespace* 'gb.install.migrations)
  9.        
  10. (alter-var-root #'lobos.migration/*migrations-namespace*
  11.                 (constantly 'gb.install.migrations))