Commit Graph

411 Commits

Author SHA1 Message Date
Felipe Sere
6284b1de49 Adds a license 2016-11-11 08:59:41 +00:00
Felipe Seré
d445b0108a Merge pull request #149 from dillonkearns/master
Anonymous functions using & for arbitary expressions
2016-10-30 11:07:45 +00: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
Felipe Seré
dab64e735e Merge pull request #148 from marosluuce/bump-elixir-version
Bump elixir version.
2016-10-25 21:57:56 +01:00
Nathan Walker
c56dddf10a Bump elixir version. 2016-10-25 15:02:54 +01:00
Uku Taht
504f5bc123 Merge pull request #145 from iamvery/unused-function
Remove unused private functions
2016-10-24 10:20:27 +01: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
Uku Taht
9ee83336d6 Merge pull request #137 from Neku/patch-1
The koan about Mapset.member?/2 should appear before Mapset.member?/2 is used
2016-07-22 19:38:16 +01:00
Simone D'Amico
0082c62bee Adding Simone to contributors 2016-07-22 19:35:05 +01:00
Simone D'Amico
9eafe23bc8 Changed order of the answers in map_sets test 2016-07-22 19:34:13 +01: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
Uku Taht
ab372ddf64 Merge pull request #136 from bnchdrff/master
Only run elixir files
2016-07-13 13:28:00 +01:00
Benjamin Chodoroff
87b5bb263c only run elixir code
ignore, for example, editor swapfiles
2016-07-05 16:04:07 -04:00
Felipe Seré
1880f10581 Merge pull request #135 from cpjolicoeur/patch-1
Fix typo
2016-06-17 17:46:08 +01: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
Uku Taht
53614ac195 Merge pull request #130 from iamvery/number-koans
Number koans
2016-06-13 23:15:00 +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
Felipe Seré
8ccd83677e Merge pull request #128 from iamvery/string-examples
Prefer function output over input
2016-06-12 22:44:49 +02: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
Uku Taht
64bb5ebc78 Merge pull request #126 from rianrainey/fix-grammar
Fix grammar omission
2016-06-08 10:23:44 +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
Felipe Seré
a836488428 Merge pull request #123 from msurekci/add_map_sets_koans
Adding new koans for map sets
2016-05-27 19:09:37 +01: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
925f6ba2f7 Change order of answers to make unit tests pass 2016-05-27 15:54:48 +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