Skip to content

Instantly share code, notes, and snippets.

View grkuntzmd's full-sized avatar

G. Ralph Kuntz, MD grkuntzmd

  • Gainesville, Florida
View GitHub Profile
Datomic.q(Query(
s"""[:find ?name
:in $$
:where [_ :db/ident ?ident]
[(namespace ?ident) ?ns]
[(name ?ident) ?name]
[(= ?ns "namespace_name")]
]"""
), database).foreach {
case name: String => println(name)
[:find ?ns ?name
:where [_ :db/ident ?ident]
[(namespace ?ident) ?ns]
[(name ?ident) ?name]
[(= ?ns "namespace_name")]
]
Datomic.q(Query(
s"""[:find ?ident
:in $$
:where [_ :db/ident ?ident]
[(namespace ?ident) ?ns]
[(= ?ns "namespace_name")]
]"""
), database).foreach {
case ident: Keyword => println(ident)
}
@grkuntzmd
grkuntzmd / Haskell-debug-trace
Last active August 29, 2015 14:02
Haskell debug #haskell #debug
import Debug.Trace
debug :: Show a => String -> a -> a
debug description value =
trace (description ++ ": " ++ show value) value