Greg Slepak avatar Greg Slepak committed 43fbf82

added extract-assoc and <-

Comments (0)

Files changed (2)

   * DF:activate-plugin can now be used to load all lisp files in a directory
   * added db/dragonfly_utils, includes fn-query-with-db, assoc-row-with-db and assoc-rows-with-db
   * fixed handling of floats in Sqlite3 on some architectures (more improvements needed though, see TODO)
+  * added 'extract-assoc' and '<-' functions to core utils
 Version 0.6


+	(define (extract-assoc lst sym-assoc-list , idx)
+		(when (setf idx (find lst (eval sym-assoc-list) match))
+			(nth idx (eval sym-assoc-list))
+		)
+	)
 	; these functions should be global (define-subclass should not)
 	(global 'load-files-in-dir 'regex-captcha 'load-once
 		'wrap-func 'add-to-load-path 'SET_DF_SELF
 		'file-ext 'del-ext 'basename 'dirname 'define-smacro
+		'extract-assoc
 	; swap these functions for ours and save the originals
 ;; @syntax (throw-not-implemented)
 ;; <p>Used to indicate that an ObjNL method *must* be overwritten.</p>
 	(constant (global 'throw-not-implemented) (fn()(throw-error "not defined by subclass!")))
+;; @syntax (<- <key> <assoc-list>)
+;; <p>An alias for 'lookup'</p>
+	(constant (global '<-) lookup)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.