functional-koans / clojure-koans Goto Github PK
View Code? Open in Web Editor NEWA set of exercises for learning Clojure
A set of exercises for learning Clojure
Output when running lein repl
#<FileNotFoundException java.io.FileNotFoundException: Could not locate exec__init.class or exec.clj on classpath: >
nREPL server started on port 63301
IllegalStateException Attempting to call unbound fn: #'koan-engine.runner/exec/set-signal-handler! clojure.lang.Var$Unbound.throwArity (Var.java:43)
reply.eval-modes.nrepl=>
Output when running lein --version
Leiningen 2.1.2 on Java 1.7.0_17 Java HotSpot(TM) Client VM
(meditations
"Destructuring is an arbiter: it breaks up arguments"
(= ":bar:foo" ((fn [[a b]] (str b a)))
[:foo :bar])
;; ...
This is for "Destructuring is an arbiter: it breaks up arguments"
. Double-checked with lein repl
and the koans.clj
, and the correct answer doesn't pass, not sure why.
Get lein koan
working with lein2. Possibly a lein-koan repo issue, but will need looking into.
Ironically enough, the koan below is skipped over because __
technically returns a keyword and is used as the filter which lets everything through. Not sure how to resolve this one, but bringing it to your attention.
in higher_order_functions.clj
"Or very weak"
(= '(:anything :goes :here) (filter (fn [x] __) '(:anything :goes :here)))
When attempting koan 01, I'm getting the following error:
> lein koan run
Starting auto-runner...
Considering /Users/glen/Development/Clojure/clojure-koans/src/koans/01_equalities.clj...
Now meditate upon /Users/glen/Development/Clojure/clojure-koans/src/koans/01_equalities.clj
---------------------
Assertion failed!
java.lang.RuntimeException: Unable to resolve symbol: in this context, compiling:(/Users/glen/Development/Clojure/clojure-koans/src/koans/01_equalities.clj:1:1)
I'm on OS X, and all dependencies are installed:
> lein deps :tree
[koan-engine "0.2.0"]
[fresh "1.0.2"]
[jline "0.9.94" :exclusions [[junit]]]
[lein-koan "0.1.2"]
[org.clojure/clojure "1.5.0"]
It looks like the erroring bits are quite recent:
28bf698
Any ideas what's up?
Thanks for awesome koans, was really nice to train with them.
At 24-macros, 4th and 5th mediations are a bit hard to understand, since both meditation and referred defmacro has blanks to fill.
In 03_lists and 04_vectors conj is used to add values to a collection. In 06_maps assoc is used - should there be an example using conj as well? Conj works to add a collection->map, but I'm not sure if it's idiomatic?
1.8.0/1.9.0:
Now meditate upon 08_conditionals.clj
---------------------
Assertion failed!
clojure.lang.ExceptionInfo: You will face many decisions
(= __ (if (false? (= 4 5)) :a :b)) {:line 13}, compiling:(/home/bob/Projects/clojure-koans/src/koans/08_conditionals.clj:11:1)
1.10.0:
Now meditate upon 08_conditionals.clj
---------------------
Assertion failed!
Syntax error compiling at (/home/bob/Projects/clojure-koans/src/koans/08_conditionals.clj:11:1).
As you can see, the 1.10 error message no longer allows you to determine what to fix.
In the final lazy sequence koan conj
is not considered a valid answer as in (= (repeat 100 :foo) (take 100 (iterate conj :foo)))
.
I checked that the accepted answer is (fn [x] x)
. I ran (= (take 100 (iterate conj :foo)) (take 100 (iterate (fn [x] x) :foo)))
on http://clojurescript.net/ to test that the different inputs have equal answers and got true
as result.
Since I couldn't find the solution for the last meditation of the datatype koan, I checked the solution and I was a bit suprised to find only :
(str "Congratulations on your Best Picture Oscar, "
"Evil Alien Conquerors!")
So we shouldn't use category
and recicpient
here?
With auto-completion, I found this solution :
(print (str "You're really the "
(.-category this) ", "
recipient
"... sorry."))
Shouldn't it be the solution here?
Do the explaination for .-
syntax comes later?
I cloned, then ran lein deps; it installed Clojure 1.2.1.
Is there a set of koans targeting 1.5.1?
How strict do you want to be with people's answers? The fact that vectors are sequences means that I used vectors for the answers in list (I'm lazy and saved typing the quote short-hand...), and the tests still passed...
"And construction by adding an element to the front is simple"
(= [:a :b :c :d :e] (cons :a '(:b :c :d :e)))
I only really hit me when, in vectors.clj, I realized
"You can create a vector in several ways"
(= () (vec nil))
If these are disciplines to be followed, then you might want to enforce the strictness? If they are just questions to contemplate, then my leeway is probably desirable?
Hey there. I just noticed that my fork of clojure-koans brought the number of forks up to 1,000!
Thanks for the effort in putting the koans together.
I had to crank up the input of factorial
to achieve StackOverflowError
on the last koan in recursion.clj
@@ -48,4 +52,4 @@
(< 1000000000000000000000000N (factorial 1000N))
"But what happens when the machine limits you?"
- (< 1000000000000000000000000N (factorial 10000N)))
+ (< 1000000000000000000000000N (factorial 100003N)))
... and boom goes the dynamite.
There are 2 problems around this:
script
currently depend on lein1 deps
(or at least having dependencies in the lib
directory)I have installed Java 1.7, clojure, and lein 2, and have cloned the github source. When I run 'lein koan run' for the first time, I get this exception:
java.io.FileNotFoundException: /bin/clojure-koans/target/stale/extract-native.dependencies (No such file or directory)
Indeed, there is no /target directory included with clojure-koans.
In koans.03-lists, it appears (based on context) the intent is for the user to enter '(:a :b :c :d :e)
as in the puzzle preceding it. However, conjoining to a list prefixes, rather than suffixes. Eg, the actual solution would be '(:e :a :b :c :d)
instead.
This appears to be unintentional, and might stand to use a different sequence than the prior puzzle or perhaps some rewording to 'break' the incorrect implication?
Running:
lein koan run
Gives:
Could not find artifact spycope:spycope:jar:0.1.2 in central (http://repo1.maven.org/maven2/)
Could not find artifact spycope:spycope:jar:0.1.2 in clojars (https://clojars.org/repo/)
This could be due to a typo in :dependencies or network issues.
Running:
lein deps
Gives:
Could not find artifact spycope:spycope:jar:0.1.2 in central (http://repo1.maven.org/maven2/)
Could not find artifact spycope:spycope:jar:0.1.2 in clojars (https://clojars.org/repo/)
This could be due to a typo in :dependencies or network issues.
$ lein --version
Leiningen 2.1.2 on Java 1.6.0_41 Java HotSpot(TM) 64-Bit Server VM
updated to lein 2.2.0
Gives the same results
The closing paren for meditations comes after the second-to-last koan instead of the last one, so the last one is never reached. Pull request to correct immediately to follow.
Running script/run on a fresh unzip of the 2011-04-13 download gives the following as the first failed test:
FAIL in clojure.lang.PersistentList$EmptyList@1 (FnLoaderThunk.java:31)
We shall contemplate truth by testing reality, via equality.
expected: (= __ true)
actual: (not (= :fill-in-the-blank true))
The file location isn't (equalities.clj:1)
as in the README, but rather (FnLoaderThunk.java:31)
which doesn't help much at all.
My system is running:
Ubuntu 11.04
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)
git clone git://github.com/functional-koans/clojure-koans.git
lein repl
Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: do in this context, compiling:(/tmp/form-init4650606221399990463.clj:1:7462)
at clojure.lang.Compiler.analyze(Compiler.java:6688)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler.eval(Compiler.java:6931)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: Unable to resolve symbol: do in this context
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.Compiler.resolveIn(Compiler.java:7164)
at clojure.lang.Compiler.resolve(Compiler.java:7108)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:7069)
at clojure.lang.Compiler.analyze(Compiler.java:6648)
... 20 more
REPL server launch timed out.
I am sure I'm doing something silly.
$ lein --version
Leiningen 2.6.1 on Java 1.8.0_91 Java HotSpot(TM) 64-Bit Server VM
Hi, i met a assert failed with this:
"Or very weak"
(= '(:anything :gose :here) (filter (fn [x] true) '(:anything :goes :here)))
am i wrong?
After running for the first time:
lein koan run
I get the error:
Could not transfer artifact org.clojure:clojure:pom:1.2.1 from/to central (http://repo1.maven.org/maven2/): GET request of: org/clojure/clojure/1.2.1/clojure-1.2.1.pom from central failed
This could be due to a typo in :dependencies or network issues.
Could not resolve dependencies
I've got Clojure 1.6 installed, but the koans won't run:
$ clj
Clojure 1.6.0
user=>
$ ./script/run
Exception in thread "main" java.lang.Exception: Clojure version 1.5 or higher required., compiling:(.../koans/script/run.clj:1:30)
First meditation: "There are a wide range of ways to generate a sequence". It should read, "There is a wide range..."
See exception below. This dependency is not 1.9+ compatible. The easy fix is to change project.clj to require clojure 1.8.
$ lein repl
Exception in thread "main" Syntax error macroexpanding clojure.core/ns at (spyscope/core.clj:1:1).
Call to clojure.core/ns did not conform to spec.
at clojure.lang.Compiler.checkSpecs(Compiler.java:6971)
at clojure.lang.Compiler.macroexpand1(Compiler.java:6987)
at clojure.lang.Compiler.macroexpand(Compiler.java:7074)
at clojure.lang.Compiler.eval(Compiler.java:7160)
at clojure.lang.Compiler.load(Compiler.java:7635)
at clojure.lang.RT.loadResourceScript(RT.java:381)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.load(RT.java:463)
at clojure.lang.RT.load(RT.java:428)
at clojure.core$load$fn__6824.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
at clojure.core$load_lib$fn__6765.invoke(core.clj:5948)
at clojure.core$load_lib.invokeStatic(core.clj:5947)
at clojure.core$load_lib.doInvoke(core.clj:5928)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$load_libs.invokeStatic(core.clj:5985)
at clojure.core$load_libs.doInvoke(core.clj:5969)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$require.invokeStatic(core.clj:6007)
at clojure.core$require.doInvoke(core.clj:6007)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at koan_engine.runner$eval1794.invokeStatic(form-init3956627785839174025.clj:1)
at koan_engine.runner$eval1794.invoke(form-init3956627785839174025.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7176)
at clojure.lang.Compiler.eval(Compiler.java:7165)
at clojure.lang.Compiler.load(Compiler.java:7635)
at clojure.lang.Compiler.loadFile(Compiler.java:7573)
at clojure.main$load_script.invokeStatic(main.clj:452)
at clojure.main$init_opt.invokeStatic(main.clj:454)
at clojure.main$init_opt.invoke(main.clj:454)
at clojure.main$initialize.invokeStatic(main.clj:485)
at clojure.main$null_opt.invokeStatic(main.clj:519)
at clojure.main$null_opt.invoke(main.clj:516)
at clojure.main$main.invokeStatic(main.clj:598)
at clojure.main$main.doInvoke(main.clj:561)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec. {:clojure.spec.alpha/problems [{:path [], :reason "Extra input", :pred (clojure.spec.alpha/cat :attr-map (clojure.spec.alpha/? clojure.core/map?) :ns-clauses :clojure.core.specs.alpha/ns-clauses), :val ((require [clojure.pprint :as pp] [clojure.string :as str] [clj-time.core :as time] [clj-time.format :as fmt])), :via [:clojure.core.specs.alpha/ns-form], :in [2]}], :clojure.spec.alpha/spec #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x4e93dcb9 "clojure.spec.alpha$regex_spec_impl$reify__2509@4e93dcb9"], :clojure.spec.alpha/value (spyscope.core "This co" (require [clojure.pprint :as pp] [clojure.string :as str] [clj-time.core :as time] [clj-time.format :as fmt])), :clojure.spec.alpha/args (spyscope.core "This co" (require [clojure.pprint :as pp] [clojure.string :as str] [clj-time.core :as time] [clj-time.format :as fmt]))}
at clojure.spec.alpha$macroexpand_check.invokeStatic(alpha.clj:705)
at clojure.spec.alpha$macroexpand_check.invoke(alpha.clj:697)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.lang.Compiler.checkSpecs(Compiler.java:6969)
... 43 more
The model of koans is excellent. But I would really like to develop other 'sets' of koans that are independent of the core koans.
For example, I would like to be able to create a new directory of koans, src/my_new_set_of_koans
with it's own resources/my_new_set_of_koans.clj
.
In fact a 'plugin' model of sorts may be even more interesting. So, separating the koan runner from the koan provider.
First of all, this whole project is really awesome. I'm still a beginner with using clojure, and I'm still on the early stages of these koans. It's great though.
There's just something I don't like about how once I get one koan right, there is no indication that it's right other than a different looking error. I just feel like I really have to squint to read the error and then think about it and then it's like ok, that last answer was actually right.
Idk. It would be nice to have some type of reward, high five, positive reinforcement type thing so I can pause and do a celebration and then start with the next failing test. Some kind of hook maybe that prints out a message the first time a test is passed. Just an idea.
Before "Iteration can be used for repetition," a step should be added that introduces the concept of iterator partials. As it stands, this step cannot be completed by a clojure neophyte (like myself) without diving into the documentation, which seems to run contrary to the clojure koans process.
Because of the koan-engine changes, the second paragraph should now read
The file `ideaboard.txt` has lots of good ideas for new koans to start,
or things to add to existing koans. So write some fun exercises,
add your answers to `resources/koans.clj`, and we'll get them in there!
In the Readme file under Getting Started it is suggested to download the zip. This links to where Version 0.4.6 from 2012 is the newest zip. It should probably link to the releases with 0.5 available.
I am unable to run koan.
Here is what is returned when I run "java -version":
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)
This is the output when I run "lein koan run":
Copying 4 files to /home/jasoon/git/clojure-koans/.lein-plugins
Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath: (koan.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5441)
at clojure.lang.Compiler.eval(Compiler.java:5416)
at clojure.lang.Compiler.load(Compiler.java:5858)
at clojure.lang.RT.loadResourceScript(RT.java:340)
at clojure.lang.RT.loadResourceScript(RT.java:331)
at clojure.lang.RT.load(RT.java:409)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$require.doInvoke(core.clj:4881)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at leiningen.core$resolve_task.invoke(core.clj:208)
at leiningen.core$apply_task.invoke(core.clj:258)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval73.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5425)
at clojure.lang.Compiler.eval(Compiler.java:5392)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:482)
at clojure.lang.Var.invoke(Var.java:381)
at clojure.lang.AFn.applyToHelper(AFn.java:178)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:
at clojure.lang.RT.load(RT.java:412)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4519.invoke(core.clj:4915)
at clojure.core$load.doInvoke(core.clj:4914)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:4729)
at clojure.core$load_lib.doInvoke(core.clj:4766)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4800)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:544)
at clojure.core$use.doInvoke(core.clj:4892)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at leiningen.koan$eval99$loading__4414__auto____100.invoke(koan.clj:1)
at leiningen.koan$eval99.invoke(koan.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5425)
... 37 more
Help would be greatly appreciated!
Jason
Something is wrong in the namespace setup (I think).
--> lein repl
nREPL server started on port 49447 on host 127.0.0.1 - nrepl://127.0.0.1:49447
REPL-y 0.4.3, nREPL 0.6.0
Clojure 1.10.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_121-b13
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e
koan-engine.runner=> (string/join '(1 2 3))
Syntax error compiling at (form-init1178655580028819709.clj:1:1).
No such namespace: string
The koans themselves run successfully. This is MacOS. Sorry if I'm doing something dumb.
Hey guys,
First off, this project kicks ass. I'm one of the committers on https://github.com/nathanmarz/cascalog (along with @nathanmarz), where we struggle daily to help people over that initial conceptual wall.
clojure-koans does this so well that I can't help but think that its structure would be immensely helpful to Cascalog (and really any of the more taxing clojure libraries out there.) Cascalog-Koans, core.logic-koans; all would be excellent companion libraries.
Do you guys have any thoughts on the the idea of extracting the clojure-koan structure, meditations macro etc out into a project or template that could be used by others? I'd be happy to take a crack at this if you're open to it, but don't want to do anything without a blessing and guidance.
Cheers,
Sam
When I try the following kata:
"Symbolism is all around us"
(= 'foo (symbol foo))
I get this error:
Now meditate upon [...]clojure-koans/src/koans/01_equalities.clj
---------------------
Assertion failed!
java.lang.RuntimeException: Unable to resolve symbol: foo in this context, compiling:([...]clojure-koans/src/koans/01_equalities.clj:30:11)
Hey Colin,
I'm noticing some unusual output coming from the functions.clj
koans. Particularly, the koans that use the %
syntax:
"Or using even shorter syntax"
(= 30 (#(* 15 %) 2))
Problem in /Users/skim/local/git/clojure-koans/src/koans/functions.clj
---------------------
Assertion failed!
Or using even shorter syntax
(= __ ((fn* [p1__1085#] (* 15 p1__1085#)) __))
Not sure if you're aware of it or not, but thought I'd bring it up. Cheers!
Steps to reproduce:
script/run
As long as the file is open and modified, but unsaved, the (namaste)
function is called at every refresh step. Emacs creates a lock file called .#<koan>.clj
, which confuses the runner.
It should be possible to make the runner ignore hidden files.
Idea: hook this up as a jupyter notebook? Unless of course it takes away from the repl experience?
The test for "You may not be able to find an entry for a key" doesn't fail because the correct answer is nil.
Using the instructions from the README
here and at the clojurekoans website, I wasn't able to get them running until I noticed in the project.clj
the lein-koans plugin and read its docs. I think the issue is with lein 2 and the run script; it expects to find the clojure lib in ./lib but lein deps
doesn't populate the lib directory any more. Should the instructions be updated?
Thanks.
I think it would be nice to add Koans for generative tests with tests.generative
after the metadata koans, and event-driven agent koans after the other reference type koans.
What do we think about such a thing? Should I go write some up? I'm planning on using Stuart Halloway's "Programming Clojure" as inspiration for the docstrings and pathology of ideas.
In recursion.clj depending on how the user implements (defn factorial [n] &body), they may trigger a stack overflow.
The test runner, however, doesn't seem to report these stack overflows, but just returns an assertion error.
Can we report stack overflows when they arise?
Sample bad implementation:
(defn factorial [n]
(if (= n 0)
1
(* n (factorial (dec n)))))
There should be exactly two blessed ways to run the koans. Using lein 2 is a good idea to get people a good REPL and have them ready to actually do things when they're done w/ the koans. But there's also a lot of value in the easy zipfile-based approach where you just download, unzip, and go.
Calling those 2 paths out specifically would probably help, so people can follow one thread rather than searching for their option in every section.
The answers sheet for the last "functions" question provides the right numeric answer, but seems to miss the point of the question. It doesn't use the 'square' function at all, but just hardcodes the right answer.
Not sure the right place to report this, but...
The new Web site (http://clojurekoans.com/) is very nice, but there is a broken link for Speclj:
http://http//speclj.com/
Cheers,
John
It's not clear whether I am only allowed to touch the ___ parts of code in order to make tests pass or can I make changes outside ___ too?
For instance this test from destructuring seems pretty hard to solve if I'm only allowed to touch the ___ part.:
"All together now!"
(= "Test Testerson, 123 Test Lane, Testerville, TX"
(___ ["Test" "Testerson"] test-address)))
"Don't forget: first things first"
(= [__ __ __ __]
(let [ab-adder (partial concat [:a :b])]
(ab-adder [__ __])))
Using http://clojurescript.net/
REPL
that expression returns an Array (:a :b __ __)
,
and not a Vector [:a :b __ __]
as it is stated in the koan (ab-adder [__ __ __ __])
clojure.core/concat documentation
It would be a Vector if we add into []
:
(into [] (concat [:a :b] ["a" "b"]))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.