{"id":13491364,"url":"https://github.com/functional-koans/clojure-koans","last_synced_at":"2025-05-14T07:08:31.594Z","repository":{"id":1158661,"uuid":"1046208","full_name":"functional-koans/clojure-koans","owner":"functional-koans","description":"A set of exercises for learning Clojure","archived":false,"fork":false,"pushed_at":"2024-05-28T20:23:52.000Z","size":283,"stargazers_count":3766,"open_issues_count":9,"forks_count":2142,"subscribers_count":120,"default_branch":"master","last_synced_at":"2025-04-09T02:16:36.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/functional-koans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-11-02T22:12:23.000Z","updated_at":"2025-04-08T20:12:18.000Z","dependencies_parsed_at":"2025-02-11T18:57:45.864Z","dependency_job_id":null,"html_url":"https://github.com/functional-koans/clojure-koans","commit_stats":{"total_commits":316,"total_committers":69,"mean_commits":4.579710144927536,"dds":"0.38291139240506333","last_synced_commit":"76b279a8a87e3f03e0df6df86ff80ee369b4276f"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functional-koans%2Fclojure-koans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functional-koans%2Fclojure-koans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functional-koans%2Fclojure-koans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/functional-koans%2Fclojure-koans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/functional-koans","download_url":"https://codeload.github.com/functional-koans/clojure-koans/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092775,"owners_count":22013290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:00:56.173Z","updated_at":"2025-05-14T07:08:31.563Z","avatar_url":"https://github.com/functional-koans.png","language":"Clojure","funding_links":[],"categories":["Clojure","Languages"],"sub_categories":["Clojure"],"readme":"# Clojure Koans\n\nThe Clojure Koans are a fun way to get started with Clojure - no experience\nassumed or required. Follow the instructions below to start making tests pass!\n\n\n## Getting Started\n\nI recommend starting from a cloned or forked repo. This way you'll be able to\ntrack your progress in Git. You might want to create your own branch - that way\nif you pull back the latest koans from master, it'll be a bit easier to manage\nthe inevitable conflicts if we make changes to exercises you've already\ncompleted.\n\nYou have a few options for installation:\n\n- Install the dependencies for the koans (such as Clojure) on your machine\n- Use Vagrant and the configuration in this repository\n- Use Docker\n\nInstructions for each option are below!\n\n\n### Installation on Your Machine\n\nThe only things you'll need to run the Clojure Koans are:\n\n- JDK (I suggest version 8, but anything 6 or above should work fine)\n- [Leiningen](http://github.com/technomancy/leiningen), a build tool for Clojure\n\nOnce you've cloned this repo and installed the dependencies, you can run:\n\n```\nlein repl\n```\n\nto make sure all the dependencies get downloaded properly (and then `(exit)`\nwhen you want to quit). See below for details on the REPL.\n\n\n### Installation with Vagrant\n\nMake sure you have [Vagrant](https://www.vagrantup.com/) and\n[VirtualBox](https://www.virtualbox.org) installed.\nIn the root directory of the project, execute:\n\n```\nvagrant up\nvagrant ssh\ncd /vagrant\nlein koan run\n```\n\n\n### Installation with Docker\n\nOnce you've got [Docker](https://www.docker.com/) installed, you're basically\nall set. You can run these commands to get started:\n\nTo run koans:\n\n```\ndocker run --rm -it -v $(pwd):/app -w /app clojure lein koan run\n```\n\nTo start up a REPL:\n\n```\ndocker run --rm -it -v $(pwd):/app -w /app clojure lein repl\n```\n\n\n## Running the Koans\n\nRun the koans via:\n\n`lein koan run`\n\nIf want to run directly from a REPL, once you are inside the `lein repl` prompt you can run the koans with\n\n`(exec \"run\")`\n\nEither way, it's an auto-runner, so as you save your files with the correct\nanswers, it will advance you to the next koan or file (conveniently, all files\nare prefixed with the sequence that you should follow).\n\nYou'll see something like this:\n\n    Now meditate on /home/colin/Projects/clojure-koans/src/koans/01_equalities.clj:3\n    ---------------------\n    Assertion failed!\n    We shall contemplate truth by testing reality, via equality.\n    (= __ true)\n\nThe output is telling you that you have a failing test in the file named\n`01_equalities.clj`, on line 3. So you need to open that file up and make\nit pass!  You'll always be filling in the blanks to make tests pass.\nSometimes there could be several correct answers (or even an infinite number):\nany of them will work in these cases. Some tests will pass even if you replace\nthe blanks with whitespace (or nothing) instead of the expected answer. Make sure\nyou give one correct expression to replace each blank.\n\nThe koans differ from normal TDD in that the tests are already written for you,\nso you'll have to pay close attention to the failure messages, because up until\nthe very end, making a test pass means that the next failure message comes\nup.\n\nWhile it might be easy (especially at first) to fill in the blanks making\nthings pass, you should work thoughtfully, making sure you understand why the\nanswer is what it is.  Enjoy your path to Clojure enlightenment!\n\n\n## Trying more things out\n\nIt's very useful to try things out in a REPL (Read-Evaluate-Print Loop)\nwhenever you get stuck or curious. Run:\n\n```\nlein repl\n```\n\nand you'll be able to type expressions in, and see what output they produce.\n\nHere are some interesting commands you might try, once you're in a running REPL:\n\n```clojure\n(find-doc \"vec\")\n(find-doc #\"vec$\")\n(doc vec)\n```\n\nAnd if those still don't make sense:\n\n```clojure\n(doc doc)\n(doc find-doc)\n```\n\nwill show you what those commands mean.\n\nYou can exit the REPL with `CTRL-d`, `(exit)`, or `(quit)`.\n\n\n## Contributing\n\nPatches are encouraged!  Make sure the answer sheet still passes\n(`lein koan test`), and send a pull request.\n\nThe file ideaboard.txt has lots of good ideas for new koans to start, or things\nto add to existing koans.  So write some fun exercises, add your answers to\n`resources/koans.clj`, and we'll get them in there!\n\nPlease follow the guidelines in\nhttp://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html for\ncommit messages, and put your code in a feature branch (not master) before\nmaking the pull request. This makes patches easier to review.\n\nFeel free to contact me (Colin Jones / trptcolin) on Github or elsewhere if you\nhave any questions or want more direction before you start pitching in.\n\n\n## Contributors\n\nhttps://github.com/functional-koans/clojure-koans/contributors\n\n\n## Credits\n\nThese exercises were started by [Aaron Bedra](http://github.com/abedra) of\n[Relevance, Inc.](http://github.com/relevance) in early 2010, as a learning\ntool for newcomers to functional programming. Aaron's macro-fu makes these\nkoans clear and fun to use and improve upon, and without Relevance's\ninitiative, this project would not exist.\n\nUsing the [koans](http://en.wikipedia.org/wiki/koan) metaphor as a tool for\nlearning a programming language started with the\n[Ruby Koans](http://rubykoans.com) by [EdgeCase](http://github.com/edgecase).\n\n\n## License\n\nThe use and distribution terms for this software are covered by the\nEclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)\nwhich can be found in the file epl-v10.html at the root of this distribution.\nBy using this software in any fashion, you are agreeing to be bound by\nthe terms of this license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctional-koans%2Fclojure-koans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunctional-koans%2Fclojure-koans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunctional-koans%2Fclojure-koans/lists"}