• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

sritchie/core.logic-koans: Learn core.logic with koans!

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

sritchie/core.logic-koans

开源软件地址:

https://github.com/sritchie/core.logic-koans

开源编程语言:

Clojure 72.8%

开源软件介绍:

core.logic-koans

CUSTOMIZE ME with some project specific details!

Koans are a fun and easy way to learn a clojure project - no experience assumed or required. Just follow the instructions below to start making tests

Getting Started

run lein deps in the project directory. This will download all dependencies you need to run the koans.

Running the Koans

To run the koans, simply run:

script/run on Mac/*nix

script\run on Windows

As you save your files with the correct answers, core.logic-koans will automatically advance you to the next koan or file.

When you execute run you'll see something like this:

Problem in  /home/paduan/code/core.logic-koans/src/koans/equalities.clj
---------------------
Assertion failed!
We shall contemplate truth by testing reality, via equality.
(= __ true)

The output is telling you that you have a failing test in src/koans/equalities.clj. Open that file up and make it pass! In general, you just fill in the blanks to make tests pass. Sometimes there are several (or even an infinite number) of correct answers: any of them will work in these cases.

The koans differ from normal TDD in that the tests are already written for you, so you'll have to pay close attention to the failure messages, because up until the very end, making a test pass just means that the next failure message comes up.

While it might be easy (especially at first) to just fill in the blanks making things pass, you should work thoughtfully, making sure you understand why the answer is what it is. Enjoy your path to enlightenment!

Trying more things out

core.logic-koans comes with a REPL (Read-Evaluate-Print Loop).

script/repl on Mac/*nix

script\repl on Windows

Here are some interesting commands you might try once you've got the REPL running:

(find-doc "vec")
(find-doc #"vec$")
(doc vec)

And if those still don't make sense:

(doc doc)
(doc find-doc)

will show you what those commands mean.

You can exit the REPL with CTRL-d on any OS.

License

Copyright (C) 2011 FIXME

Distributed under the Eclipse Public License, the same as Clojure.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap