문제

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