Commits

David Krentzlin  committed 2d33199

trying something

  • Participants
  • Parent commits 6d9f633

Comments (0)

Files changed (1)

 
 Examples:
 
-  (define my-config 
-   '((production
-      (database
-        (username "prod")
-        (password "prodpwd")
-        (host "test.example.com")))
-     (development
-      (database
-        (username "dev")
-        (password "devpwd")
-        (host "dev.example.com")))
-    (logging
-     (destination "/var/log/application.log")
-     (levels (error warning)))))
-   
-  ;; now you can access the data like so
-  
-  (config-ref my-config '(production database username)) ;; => "prod"
-  (config-ref my-config '(production database))          ;; => (username "prod")
-  (config-ref my-config '(production database))   ;; => ((username "prod") (password "prodpwd") (host "test.example.com"))
-  
-  (config-let my-config ((db-user (production database username))
-                         (db-pw   (production database password))
-                         (db-host (production database host)))
-    (connect-to-database db-host db-user db-pw))
-  
-  ;; postprocess data
   (config-ref my-config '(logging levels) post-process: (lambda (ls) (cons 'critical ls))) ;; => (critical error warning)