Commit Graph

338 Commits

Author SHA1 Message Date
Jay Hayes
95a2ed95a6 Fix sorted?/1 implementation 2017-02-19 07:44:45 -06:00
Jay Hayes
4a9800f1f7 Further simplify mapset example with sorted?/1 function 2017-02-19 07:37:57 -06:00
Jay Hayes
5731f8ac3b Simplify variable names and add space 2017-02-19 07:20:49 -06:00
Jay Hayes
cef72bc0f8 Add comment about "why 33?" 2017-02-19 07:15:23 -06:00
Jay Hayes
ca0151ba0c Simplify description 2017-02-19 07:14:39 -06:00
Jay Hayes
c08f22b0d2 Extract common value in example 2017-02-19 07:14:33 -06:00
Jay Hayes
84cd227108 whitespace 2017-02-19 07:13:01 -06:00
huyz
0985507d45 Fixed __. Should be ___ 2017-02-10 23:50:44 -08:00
huyz
0b1f19accc Clarify the koan that shows that MapSets are unordered. 2017-02-10 23:43:21 -08:00
Jesse J. Anderson
dafbfa6daa fix comma placement typo 2017-02-07 22:15:57 -08:00
Felipe Seré
136e02cafe Merge pull request #162 from srufle/master
Demonstrate put_in to manipulate nested struct values
2017-01-26 20:02:30 +00:00
Stephen Rufle
21a162b80e Changed to a single line, so its consistent with other sections 2017-01-24 18:34:07 -07:00
Jay Hayes
b8d7abe4ea Change definition of anonymous greet
That prevents the confusion of mixing up the anonymous and named
implementations fixed by 55f592.
2017-01-24 08:08:01 -06:00
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