{"id":22769759,"url":"https://github.com/bfontaine/lein-fore-prob","last_synced_at":"2025-06-13T04:06:34.710Z","repository":{"id":13862160,"uuid":"16559951","full_name":"bfontaine/lein-fore-prob","owner":"bfontaine","description":"A leiningen plugin to make a local copy of a problem from 4clojure","archived":false,"fork":false,"pushed_at":"2020-09-30T21:26:25.000Z","size":76,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T06:08:50.591Z","etag":null,"topics":["clojure","leiningen","plugin"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sammyyx/MCShop","license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfontaine.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-05T21:57:49.000Z","updated_at":"2021-12-01T13:51:41.000Z","dependencies_parsed_at":"2022-09-23T16:01:09.431Z","dependency_job_id":null,"html_url":"https://github.com/bfontaine/lein-fore-prob","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bfontaine/lein-fore-prob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Flein-fore-prob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Flein-fore-prob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Flein-fore-prob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Flein-fore-prob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfontaine","download_url":"https://codeload.github.com/bfontaine/lein-fore-prob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfontaine%2Flein-fore-prob/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259578202,"owners_count":22879213,"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":["clojure","leiningen","plugin"],"created_at":"2024-12-11T15:15:27.851Z","updated_at":"2025-06-13T04:06:34.232Z","avatar_url":"https://github.com/bfontaine.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lein-fore-prob\n\n[![Build Status](https://travis-ci.org/bfontaine/lein-fore-prob.png?branch=master)](https://travis-ci.org/bfontaine/lein-fore-prob)\n[![Coverage Status](https://coveralls.io/repos/bfontaine/lein-fore-prob/badge.png)](https://coveralls.io/r/bfontaine/lein-fore-prob)\n\nA leiningen plugin which given a problem from 4clojure will populate the\ncurrent project’s tests with the problem’s tests. This is based on\n[`lein-foreclojure-plugin`][lfp] code updated for Leiningen 2.\n\n[lfp]: https://github.com/broquaint/lein-foreclojure-plugin\n\n## Usage\n\nAdd the plugin in your `~/.lein/profiles.clj`:\n\n```clj\n{:user {:plugins [ ; ... other plugins ...\n                  [lein-fore-prob \"0.1.3\"]]}}\n```\n\nCreate a project to store 4clojure problems:\n\n```\nlein new probs-from-4clj\ncd probs-from-4clj\n```\n\nThen use the plugin:\n\n```\nlein fore-prob [open] \u003cproblem id\u003e [\u003cproblem id\u003e ...]\n```\n\nYou can use multiple problem ids at the same time. Use the `open` subcommand to\nopen these problems in a browser instead of adding it to the current project.\n\n## What’s added\n\nGiven a new project like this:\n\n\t.\n    ├── ...\n    ├── project.clj\n    ├── src\n    │   └── probs_from_4clj\n    │       └── core.clj\n    └── test\n        └── probs_from_4clj\n            └── core_test.clj\n\nA stub function will be added to `src/probs_from_4clj/core.clj` e.g for\n[problem 98][98] an `equivalence-classes-solution` function is defined. Then in\n`test/probs_from_4clj/core_test.clj` the tests for that problem will be added\ne.g. again for [problem 98][98] the test would be `can-equivalence-classes`. At\nthat point you can flesh out the function until the test passes then copy\nit over to [4clojure.org][4clj] when you’re happy with it.\n\n[98]: http://www.4clojure.com/problem/98 \"98. Equivalence Classes\"\n[4clj]: http://www.4clojure.com/\n\n### Example\n\nHere is what `lein fore-prob 43` would add:\n\n```clj\n;; in src/your-project/core.clj:\n\n;; problem 43 (Medium)\n(defn reverse-interleave-solution\n  [\u0026 args] ;; update args as needed\n  ;; Write a function which reverses the interleave process into x number of subsequences.\n  nil)\n\n\n;; in test/your-project/core_test.clj:\n\n;; problem 43\n(deftest can-reverse-interleave\n  (is (= (reverse-interleave-solution [1 2 3 4 5 6] 2) '((1 3 5) (2 4 6))))\n  (is (= (reverse-interleave-solution (range 9) 3) '((0 3 6) (1 4 7) (2 5 8))))\n  (is (= (reverse-interleave-solution (range 10) 5) '((0 5) (1 6) (2 7) (3 8) (4 9)))))\n```\n\n## License\n\nCopyright © 2014-2019 Baptiste Fontaine\n\n**Original code:**\n\nCopyright © 2011 Dan Brook\n\nDistributed under the Eclipse Public License, the same as Clojure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Flein-fore-prob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfontaine%2Flein-fore-prob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfontaine%2Flein-fore-prob/lists"}