Jay Hayes
ec08c7fd7a
Add more examples for Integer.parse
...
- show behavior of parsing with unparsable suffix bits
- show behavior of parsing float as integer
2016-06-13 09:13:46 -05:00
Jay Hayes
2127c9ea27
Update Float.parse example to actually parse a float
2016-06-13 09:13:27 -05:00
Jay Hayes
4674b5b694
Move Float.parse examples right after Integer.parse
2016-06-13 09:12:58 -05:00
Jay Hayes
c6f2738fc7
Refactor error expansion to locate errors in koan module
...
The previous strategy wasn't robust enough to detect typos in function
calls. For example, if you misremembered String.duplicate/2 as
String.repeat/2 the koan runner would hang and have to be restarted.
This is because the stacktrace for an error like that doesn't have line
numbers. To avoid the problem, we detect the first pieces of the
stracktrace that is in the koan module. I can't decide if that's a
perfect solution, but it seemed to work in my testing. Hoping to get
other's feedback.
2016-06-11 08:43:37 -05:00
Jay Hayes
43c2bbdd71
Show left and right hand values when equality fails
...
For assertions that contain function calls, displaying just the
expression is not helpful. For e.g.
Assertion failed
String.upcase("foo") == "Foo"
The learner is given no extra information to help them learn. Sure they
might consult the documentation (and should!), but perhaps a better
experience would be for us to inform the learner about the values it
encountered.
Assertion failed
String.upcase("foo") == "Foo"
left: "FOO"
right: "Foo"
Learner: 💡 ah hah! it upcases the whole string! 💫
2016-06-10 11:39:39 -05:00
Jay Hayes
ae2e7feeac
whitespace
2016-06-10 11:39:17 -05:00
Jay Hayes
efb3d116c7
Remove unneeded function
...
It's only used in one place, no need for the abstraction currently.
2016-06-10 11:38:30 -05:00
Jay Hayes
f9a7f7016c
Prefer function output over input
...
When learning about the behavior of a function, in general the learning
experience is better when provided with the input and asked for the
output.
2016-06-10 11:08:25 -05:00
Uku Taht
3c217073f5
Merge pull request #125 from rianrainey/remove-numbers-trailing-whitespace
...
Remove trailing whitespace
2016-06-08 10:23:59 +01:00
Rian Rainey
31332cfdbb
Remove trailing whitespace
2016-06-06 18:34:11 -05:00
Rian Rainey
25f9be439c
Fix grammar omission
2016-06-06 06:49:21 -05:00
Mahmut Surekci
48df8ad8af
Demonstrating MapSets similarity to List using Enum.fetch. Koan added to demonstrate MapSets being unordered after 32.
2016-05-27 18:44:47 +01:00
Mahmut Surekci
317ea5d208
Reposition MapSets koans. Reposition some of the koans to make it clear why MapSets are interesting.
2016-05-27 15:51:45 +01:00
Mahmut Surekci
4f81db44a2
Merge remote-tracking branch 'remotes/upstream/master' into add_map_sets_koans
...
Conflicts:
lib/runner.ex
2016-05-27 15:47:49 +01:00
Felipe Seré
c72e60db41
Merge pull request #124 from elixirkoans/protocols
...
Protocols
2016-05-27 14:09:53 +01:00
Mahmut Surekci
c95f97e968
Merge remote-tracking branch 'remotes/origin/master' into add_map_sets_koans
2016-05-27 13:57:35 +01:00
gemcfadyen
d9ee4ccea8
Adds an introduction
2016-05-27 10:24:35 +01:00
gemcfadyen
5b2ff206fa
update the default case to use a generic message
2016-05-27 10:17:21 +01:00
gemcfadyen
e9ab727448
Adds a koan to demonstrate the use of deriving a default behaviour
2016-05-27 10:09:33 +01:00
Mahmut Surekci
317ccc790f
James Bond reference in the intro title
2016-05-26 18:48:46 +01:00
Mahmut Surekci
ba673557cf
Remove blank line and intro title changed
2016-05-26 10:33:46 +01:00
gemcfadyen
143b2bb7ff
collapse two koans into one
2016-05-26 09:14:53 +01:00
Mahmut Surekci
5e9e5e3891
Adding new koans for map sets
2016-05-26 02:02:20 +01:00
Mahmut Surekci
458d18494e
Added some koans for the Range module
2016-05-25 23:11:56 +01:00
gemcfadyen
c970ed01dd
Protocol examples updated to use Structs
2016-05-25 17:44:42 +01:00
Mahmut Surekci
14858cd497
reposition numbers koans in the runner.ex file
2016-05-25 12:07:40 +01:00
Mahmut Surekci
a57ba3da2d
Add koans for floats, rename to numbers koans, reposition on the list
2016-05-25 12:06:52 +01:00
Mahmut Surekci
9baecdf031
Add a test for hexidecimal parsing
2016-05-24 19:43:00 +01:00
Mahmut Surekci
6e9dc8b328
fix formatting
2016-05-24 17:31:53 +01:00
Mahmut Surekci
cc3232a31f
Added very basic koans for integers
2016-05-24 17:29:18 +01:00
kamidev
753550cded
Add Sigils to test runner
2016-05-22 19:24:38 +02:00
Felipe Sere
74b6e06ddf
Fix typos and bring back the failing pattern match.
2016-05-20 08:02:59 +01:00
Felipe Sere
fc00c6ae60
Move pinning to the back of the kaon and enhance example
2016-05-18 22:40:19 +01:00
Felipe Seré
80a4a5b8d2
Merge pull request #119 from iamvery/sigil-koans
...
Dass Koans about Sigil
2016-05-18 07:32:02 +01:00
Jay Hayes
e60a284e36
Make list sigil lessons a little more challenging
2016-05-17 07:54:33 -05:00
Jay Hayes
649c649084
Port sigil koans from iamvery/elixir-koans
...
7705d743ac/about_sigils.exs
h/t @sebastiangeiger
2016-05-16 18:43:57 -05:00
Jay Hayes
5f149826e1
Rename existing koans to make room for sigils
2016-05-16 18:43:22 -05:00
Felipe Sere
0b508d490d
Make clearing the screen the default
2016-05-16 23:23:38 +01:00
Felipe Sere
bccb41c280
Removes last outside references to the Colour module
2016-05-15 01:58:57 +02:00
Felipe Sere
ddcd971ede
To improve testing, add a layer of indirection around colours.
2016-05-14 00:23:07 +02:00
Felipe Sere
0936ed56e2
Use the new modules
2016-05-14 00:23:05 +02:00
Felipe Sere
af543d1b62
Extracts modules for different sections of the UI
2016-05-14 00:22:41 +02:00
Felipe Sere
3ef7051888
Moves showing the intro into the formatting of a failure
2016-05-13 07:51:31 +01:00
Felipe Sere
f5477f0fb0
All modules have an intro.
2016-05-11 21:44:18 +01:00
Felipe Sere
94ab9826ae
Make intro/2 more readable by making 'not' more explicit.
2016-05-10 23:41:22 +01:00
Felipe Sere
c0a670257d
Fixes sample intro.
2016-05-10 23:40:31 +01:00
Felipe Sere
b90c748f20
Adds an example (cheesy!) first intro.
2016-05-10 23:03:42 +01:00
Felipe Sere
751f849585
Collect all intro printing into display
2016-05-10 23:02:23 +01:00
Felipe Sere
3d79284aab
Shows into the first time a module is visted.
2016-05-10 23:02:23 +01:00
Felipe Sere
149cc47195
Cleanup how koan modules get their intros
2016-05-10 23:02:23 +01:00