简体   繁体   English

如何转换clojure.contrib.monads与clojurescript一起使用?

[英]How can I convert clojure.contrib.monads to be used with clojurescript?

I would like to use the Clojure Monad library clojure.contrib.monads in ClojureScript. 我想在ClojureScript中使用Clojure Monad库clojure.contrib.monads。 Is there an implementation that has been tested as known to work with ClojureScript as it does not appear in the standard ClojureScript distribution? 是否存在经过测试可与ClojureScript一起使用的实现,因为它没有出现在标准ClojureScript发行版中?

(I am assumming I may have to just copy and paste the code from a clj into a cljs. Although what about the macros, as these need to be in a clj file) (我假设我可能只需要将clj中的代码复制并粘贴到cljs中即可。尽管宏又如何,因为这些宏必须位于clj文件中)

Update: (am I right in thinking that these are the two files I will need?) 更新:(我是不是认为这是我需要的两个文件?)

Files 档案

Ok, it looks like this doesn't exist. 好的,看来这不存在。 I'm going to have to go through the implementation in Clojure first to make sure that eval and similar stuff is not used, as Clojurescript does not support all the features of Clojure. 我将首先必须在Clojure中进行实现,以确保不使用评估和类似的内容,因为Clojurescript不支持Clojure的所有功能。

您可能想看看Jim Duey的protocol-monads ,最近添加了cljs支持-有关详细信息,请参见此提交

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM