Created
March 20, 2009 07:02
-
-
Save JustinTulloss/82257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Using "let" here, since in my real code I use the reference later. | |
; You could use "doto" if you just wanted to do a bunch of database | |
; operations and then close the db. | |
(let [pref-db (HDB.)] | |
(.open pref-db "user-prefs.hdb" (bit-or HDB/OWRITER HDB/OCREAT)) | |
(.put pref-db "Hello World" "Saying Hi! to the big old world out there") | |
(println (.get pref-db "Hello World")) | |
(.close pref-db)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment