无法解决符号:clojure.core.logic/membero
我正在尝试按照由 https://clojuredocs.org/clojure.core.core.core.core.logic.logic/membero
(ns clojure-noob.core
(:gen-class)
(:require [clojure.core.logic :as logic]))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(println "Hello, World!"))
(logic/membero :a [:a :b :c]) ; => Could not resolve symbol: logic/membero
(clojure.core.logic/membero :a [:a :b :c]); => Could not resolve symbol: clojure.core.logic/membero
我只是我开始我的斗篷之旅,请保持温柔。 我看到2种可能性,
- a)Membero被弃用或转移到其他目录
- b)有关我的设置的一些目录,这阻止了我运行它。
a)似乎被排除在外,因为在最近的帖子中仍有会员提到 我如何使用core.logic在地图数据库中搜索有效的嵌套地图? set incor.logic中的会员资格
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢MartinPůA向我指出依赖关系。
会员不是这篇文章的重点。我的问题是当我开始看到“无法解决符号:”错误时,我不知道在哪里添加依赖项。
添加project.clj中的依赖性如下所示。
接下来的我的下一个混乱是为什么我们不能(需要[org.clojure/core.logic“ 1.0.1”])才能更改依赖项而无需重新启动repl。
事实证明,这是开箱即用的不支持的东西,但通常要求
任何将依赖依赖性添加到Lein Project的方式重新启动?
任何将依赖依赖性添加到Lein Project的方式重新启动?
promegranate https://github.com/clj-commons/pomegommons/pomegomons/pomegranate/pomegranate/pomegranate
被提出是做到这一点的手段。尝试时会发布更新。
Thank you to Martin Půda for pointing me to dependencies.
membero was not the point of this post. My problem is not knowing where to add dependencies when I start seeing "Could not resolve symbol:" errors.
Adding the dependency in project.clj like the following solves the issue.
My next confusion that followed was why can't we do (require [org.clojure/core.logic "1.0.1"]) in repl to just change the dependencies without restarting repl.
Turns out this is something that is not supported out of the box but commonly requested
https://clojureverse.org/t/whats-the-right-way-to-hot-reload-dependencies-without-restarting-the-repl/5357
Any way to add dependency to lein project without REPL restart?
Any way to add dependency to lein project without REPL restart?
Promegranate https://github.com/clj-commons/pomegranate
was proposed as a means to do it. Will post an update when I tried it.