Skip to content

Instantly share code, notes, and snippets.

Avatar

G. Ralph Kuntz, MD grkuntzmd

  • Gainesville, Florida
View GitHub Profile
View Find Datomic ident names
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)
View Find Datomic idents in a namespace
[:find ?ns ?name
:where [_ :db/ident ?ident]
[(namespace ?ident) ?ns]
[(name ?ident) ?name]
[(= ?ns "namespace_name")]
]
View Find Datomic idents in namespace [Scala]
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 Aug 29, 2015
Haskell debug #haskell #debug
View Haskell-debug-trace
import Debug.Trace
debug :: Show a => String -> a -> a
debug description value =
trace (description ++ ": " ++ show value) value