Jason Huang
55f59208b2
should call anonymous function with dot
2017-01-24 13:36:42 +08:00
srufle
55f1648bbd
Demonstrate put_in using atoms to manipulate nested values of a nested
...
Map
2017-01-22 11:15:17 -07:00
srufle
d467985778
Demonstrate update_in to manipulate nested struct values
2017-01-22 11:12:49 -07:00
srufle
516be35df9
Demonstrate put_in to manipulate nested struct values
2017-01-22 10:46:51 -07:00
Jay Hayes
578d2cb62e
Merge pull request #156 from leapingfrogs/master
...
Normalize the file before calling reload.
2017-01-21 18:20:26 -06:00
Jay Hayes
77a53e7c13
Fix Elixir 1.4 function paren warnings
2017-01-21 08:18:10 -06:00
Ian Davies
5556c6bc94
Normalize the file before calling reload.
...
Fixing: https://github.com/elixirkoans/elixir-koans/issues/138
By normalizing first we remove the IntelliJ specific suffix if it is
present which allows the ".ex" extension to correctly match IntelliJ
edited files.
2017-01-18 22:00:02 -08:00
Felipe Seré
cf244e673f
Merge pull request #150 from iamvery/format-match-failures
...
Format match failures
2016-12-23 16:51:49 +01:00
Jay Hayes
fbf1e139f0
Properly unwrap the koan body the keyword list argument
...
It's a bummer that this isn't tested. I spent just a couple minutes
trying to come up with where to put the test, but gave up for time's
sake.
See https://github.com/elixirkoans/elixir-koans/issues/151 for more
information and screenshots.
2016-12-23 08:54:06 -06:00
Jay Hayes
4bb0b06471
Format match? failures more elegantly
...
[#144 ]
2016-12-23 08:29:04 -06:00
Jay Hayes
08973f4b54
Add test for equality failure
...
This also revealed that the "test painter" has a missing interface,
yellow/0. Fixed!
[#144 ]
2016-12-23 08:28:56 -06:00
Jay Hayes
482eee1f6b
whitespace
2016-12-23 08:27:45 -06:00
Dillon Kearns
490fa050e5
Add koans to practice building anonymous functions using & for arbitrary expressions
2016-10-29 23:05:08 -04:00
Jay Hayes
cdd83644c0
Merge pull request #146 from iamvery/tweaks
...
A few tweaks to Blanks
2016-10-25 17:57:44 -05:00
Jay Hayes
78995827f7
Remove a couple more unneeded function heads
...
The `:do` seems to be accounted for by the implementation. Tests
shouldn't pass if this is needed.
2016-10-17 08:15:14 -05:00
Jay Hayes
fcc4cc6548
Remove unused function heads
...
Basically `___` will always quote as a tuple.
2016-10-17 08:11:45 -05:00
Jay Hayes
146da99c32
Replace function head with List.wrap/1
2016-10-17 07:55:03 -05:00
Jay Hayes
b277036841
Remove unused private functions
2016-10-17 07:50:16 -05:00
Simone D'Amico
3279a13cd8
The koan about Mapset.member?/2 should appear before Mapset.member?/2 is used
2016-07-21 20:35:54 +01:00
Benjamin Chodoroff
87b5bb263c
only run elixir code
...
ignore, for example, editor swapfiles
2016-07-05 16:04:07 -04:00
Craig P Jolicoeur
f534d1dc96
Fix typo
2016-06-17 11:43:39 -04:00
Felipe Seré
42dc9cb693
Merge pull request #134 from iamvery/tweaks
...
A few small things I came across
2016-06-16 08:01:53 +01:00
Jay Hayes
a2e3fe6d93
"I don't think that word means what you think it means" 😂
...
Without the argument or a local variable, these references are invoking
Kernel.node/0
http://elixir-lang.org/docs/stable/elixir/Kernel.html#node/0
2016-06-15 17:59:05 -05:00
Jay Hayes
9e03b9e47c
Remove unnecessary internal module reference
2016-06-15 17:57:25 -05:00
Jay Hayes
ad8b4b5acc
Prefer __MODULE__ internally
2016-06-15 17:53:05 -05:00
Felipe Seré
712210cb72
Merge pull request #127 from iamvery/display-inequality
...
Display inequality, guide learner
2016-06-14 23:34:24 +01:00
Felipe Seré
ec48ab6b5c
Merge pull request #129 from iamvery/error-handling
...
Refactor error expansion to locate errors in koan module
2016-06-14 23:21:29 +01:00
Uku Taht
2c9c4e6666
Merge pull request #132 from iamvery/keyword-list-update
...
Keyword List update
2016-06-13 23:15:33 +01:00
Uku Taht
b9c50fc715
Merge pull request #131 from iamvery/list-koans
...
List koans
2016-06-13 23:15:19 +01:00
Jay Hayes
e522836f09
Clarify keyword list as options example by including else clause
2016-06-13 09:30:43 -05:00
Jay Hayes
c20436d0c6
Add example for List.wrap(nil)
...
This better covers the cases of List.wrap
2016-06-13 09:29:36 -05:00
Jay Hayes
f95086b14d
Update delete_at example to also use non-numeric values
2016-06-13 09:29:14 -05:00
Jay Hayes
43f832d4e3
Clarify List.delete example
...
Using numbers in the example tends to confuse the learner about what the
purpose of the second argument to delete is. They might think it's an
index value. This is further exacerbated by the example's value at index
2 being 2. To clear this up, change the example to use non-numeric
values.
2016-06-13 09:27:56 -05:00
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