Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
import from https://github.com/mrdavidlaing/functional-koans
- Loading branch information
1 parent
f4bf1d5
commit 353f1f0
Showing
40 changed files
with
5,413 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<title>Javascript Koans</title> | ||
<link rel="stylesheet" type="text/css" href="lib/jasmine/jskoans-jasmine.css"> | ||
<script type="text/javascript" src="lib/jasmine/jasmine.js"></script> | ||
<script type="text/javascript" src="lib/jasmine/jasmine-html.js"></script> | ||
<script type="text/javascript" src="lib/jasmine/jskoans-jasmine-html.js"></script> | ||
|
||
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojo/dojo.js"></script> | ||
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/lambda.js"></script> | ||
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/array.js"></script> | ||
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/fold.js"></script> | ||
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/sequence.js"></script> | ||
<script type="text/javascript" src="lib/__.js"></script> | ||
|
||
<script type="text/javascript" src="koans/AboutExpects.js"></script> | ||
<script type="text/javascript" src="koans/AboutArrays.js"></script> | ||
<script type="text/javascript" src="koans/AboutFunctions.js"></script> | ||
<script type="text/javascript" src="koans/AboutObjects.js"></script> | ||
<script type="text/javascript" src="koans/AboutMutability.js"></script> | ||
<script type="text/javascript" src="koans/AboutLambda.js"></script> | ||
<script type="text/javascript" src="koans/AboutHigherOrderFunctions.js"></script> | ||
<script type="text/javascript" src="koans/aboutApplyingWhatWeHaveLearnt.js"></script> | ||
</head> | ||
<body> | ||
|
||
<script type="text/javascript"> | ||
jasmine.getEnv().addReporter(new JsKoansReporter()); | ||
jasmine.getEnv().execute(); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2010 David Laing | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Functional Koans - Functional Javascript # | ||
|
||
Based on Edgecase's fantastic | ||
[Ruby koans](http://github.com/edgecase/ruby_koans), the goal of the | ||
Functional Javascript koans is to teach you Functional Javascript through | ||
testing. | ||
|
||
When you first run the koans, you'll be presented with a runtime error and a | ||
stack trace indicating where the error occurred. Your goal is to make the | ||
error go away. As you fix each error, you should learn something about the | ||
Javascript language and functional programming in general. | ||
|
||
Your journey towards Javascript enlightenment starts in the koans/AboutExpects.js file. These | ||
koans will be very simple, so don't overthink them! As you progress through | ||
more koans, more and more Javascript syntax will be introduced which will allow | ||
you to solve more complicated problems and use more advanced techniques. | ||
|
||
### Running the Koans from a Browser | ||
|
||
Simply navigate to the Javascript Koans folder using a file browser, and | ||
double click on KoansRunnner.html. | ||
|
||
Any browser will do, but for the best results Firefox or Chrome is | ||
recommended. More stack trace information shows up for javascript on this | ||
browsers. | ||
|
||
The first error will be in koans/AboutExpects.js. Fix the first test and | ||
refresh the browser. Rinse and repeat until all tests turn green. | ||
|
||
The test runner used is [Jasmine](http://pivotal.github.com/jasmine/) with a | ||
customized reports viewer. | ||
|
||
### Changelog | ||
|
||
v2 - Sept 2010 - Second version based on jasmine (Thanks Greg Malcolm!) | ||
v1 - July 2010 - First version based on jsTestDriver | ||
|
||
##### License | ||
|
||
This software is (c) 2010 David Laing, and licensed under the MIT license (see | ||
LICENCE for details). Enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | ||
"http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<title>Jasmine Test Runner</title> | ||
<link rel="stylesheet" type="text/css" href="../../jasmine/jasmine.css"> | ||
<script type="text/javascript" src="../jasmine.js"></script> | ||
<script type="text/javascript" src="../jasmine-html.js"></script> | ||
|
||
<!-- include source files here... --> | ||
<script type="text/javascript" src="../jskoans-jasmine-html.js"></script> | ||
|
||
<!-- include spec files here... --> | ||
<script type="text/javascript" src="suites/KoansRunnerSpec.js"></script> | ||
|
||
</head> | ||
<body> | ||
<script type="text/javascript"> | ||
jasmine.getEnv().addReporter(new jasmine.TrivialReporter()); | ||
jasmine.getEnv().execute(); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.