clojure
limux1972
这个作者很懒,什么都没留下…
展开
-
Clojure 学习笔记之when-not
在clojure中有if 但是没有unless,但是有对应的when-not,同样if与when相对。相比于if与unless,when与when-not没有另外的条件不成立时的分支。因为按照英文的习惯没有人会说:when...else...。因此when和when-not后的body就可以包含很多的语句。因为when,与when-not是一个if主导的宏,然后把其后的body用do包装了起来。...2010-07-25 08:05:17 · 316 阅读 · 0 评论 -
clojure 学习初体会
学习clojure已有数月,总感觉那个地方不太对劲。原先看clojure的书,读clojure的文章,只是泛泛的读,粗略的看,没有仔细的、深入的读它的代码,所以总是进步不大,只学了一些皮毛的东西。 现在想看clojure中的几个框架和库,比如compojure,clj-record,conjure,leiningen,因为想用它们做个小东西,也想趁此机会仔细的研究一下clojure及其他。这...2010-07-25 08:48:19 · 167 阅读 · 0 评论 -
不可思议的Destructuring
读练http://groups.google.com/group/clojure/browse_thread/thread/b2df63353b89c27有感SLIME 代码,待整理..... ; SLIME 20100404user> (apply + (map #(let [k (key %) v (val %)] (* v (cost k))) (coo...2010-08-02 23:18:25 · 137 阅读 · 0 评论 -
Mirah --- Ruby in Javanese
Mirah, 刚刚看到的一门新的语言,号称Javanese中的ruby,formerly known as Duby.也许哪一天就会心血来潮的学习探究一番,今天在此记下来。因为看过Ruby,Clojure,都记不起什么开始的。It's creator is Charles Nutter the author of JRuby.他们真是牛,写一个语言就像我们写一个Hello Wor...原创 2010-08-04 21:23:28 · 122 阅读 · 0 评论 -
揭秘 Compojure – Part 3
揭秘 Compojure – Part 3 在第二部分中我们学习了怎么使用Compojure建立了一个框架项目。在本节中我们开始在这个项目中加入一些静态的文件。在该程序中,将使用JQuery做为前端,而Clojure作为后台,主要关注Compojure。1) 在address_book目录下创建存放静态文件的文件夹。1.mkdir publi...原创 2010-08-20 23:03:50 · 99 阅读 · 0 评论 -
Destructuring binding in def
原始链接:http://clojure101.blogspot.com/2009/04/destructuring-binding-support-in-def.htmlA lot of times when I am debugging a clojure function in REPL. I end up doing defs for all my lets and if my ...原创 2010-10-31 22:20:14 · 124 阅读 · 0 评论