What would be the best way to define or use a type relation in core.logic?

I tried something like this to get a simplified representation of the type of the form argument, but the project usage causes various issues

(defn typeo
  [form type]
  (project [form]
    (== type (-> form .getClass .getSimpleName .toLowerCase symbol))))

Is there already a proper relation for this available or should I express this differently?

有帮助吗?

解决方案

That works though of course using project means that form absolutely must be ground before this goal can be called.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top