Commit Graph
64 Commits
Author SHA1 Message Date
José Valim f9dd6f66a6 Remove function single do: definition syntax 2012-05-13 17:36:54 +02:00
José Valim e476a5ef0d Stab at new syntax 2012-05-13 15:33:57 +02:00
José Valim dc80ed6c17 Converting to a list should not be part of the enum protocol 2012-05-05 21:35:23 +02:00
José Valim 3628576dff Make Enum.split_with behave the same as :lists.splitwith 2012-05-04 10:45:30 +02:00
José Valim 2dbbd24162 Add EEx.SmartEngine that can handle assigns and for loops
This engine is used by default by EEx. We have also added support
to Enum.map_join in order to make the loop implementation easier.
2012-05-03 12:04:33 +02:00
José Valim ca7b8c9851 Add keyfind, keymember? and keydelete to List 2012-05-01 11:24:02 +02:00
José Valim 4ba1769fe9 Add Keyword.from_enum and Enum.qsort 2012-04-29 13:54:24 +02:00
José Valim e583c5c78d Docs and tidy up to Enum protocol 2012-04-28 14:56:50 +02:00
José Valim 39350aabf9 Reorganize and optimize the dict protocol by doing pattern matching 2012-04-26 14:44:18 +02:00
José Valim e7aa86aa58 Improve protocol handling 2012-04-26 14:02:09 +02:00
José Valim cc69c7b5ed Enum should always return lists, unless explicitly mentioned 2012-04-26 13:09:51 +02:00
Alexei Sholik e109ae0aae Merge branch 'new-dict-module'
Conflicts:
	test/elixir/enum_test.exs

I resolved all the conflicts and replaced assert_equal with assert ==.
2012-04-26 11:34:22 +03:00
José Valim 5210aa5da8 Now that we have faster load times, get rid of assert_equal 2012-04-26 09:29:21 +02:00
Alexei Sholik 82b81c647a Comment out one assert in enum_test 2012-04-26 09:46:32 +03:00
Alexei Sholik 327c0a49a4 assert_raises -> assert_raise 2012-04-26 09:04:16 +03:00
Alexei Sholik 25f5fa69cf Test that Enum.join does not work for dicts 2012-04-26 08:55:49 +03:00
Alexei Sholik ad8113a54a Fix issues with Enum protocol for dicts 2012-04-26 08:55:17 +03:00
Alexei Sholik 5e92c8e8db Rename Dict -> HashDict and encapsulate it in a record 2012-04-26 08:54:26 +03:00
Alexei Sholik 2c4f17fff2 Add ordered_iterator function
Some of the Enum's functions assume an ordering is defined for the collection.
Since ordering is not defined for all types, using `ordered_iterator`
allows us to raise a runtime error for those types.
2012-04-26 08:54:26 +03:00
Alexei Sholik d79ba92734 Generalize the Enum module to support dicts 2012-04-26 08:54:04 +03:00
José Valim 929f84f420 Revert removal of assert_equal 2012-04-26 00:31:40 +02:00
José Valim 9bf24191a6 Convert more files from assert_equal to assert == 2012-04-25 23:12:38 +02:00
Alexei Sholik 4f07a3c30f Minor fix in enum_test.exs 2012-03-30 18:17:28 +03:00
Alexei Sholik 50b68e60f8 Implement split_with 2012-03-30 18:17:28 +03:00
Alexei Sholik 32e0f9831a Implement take_while 2012-03-30 18:17:27 +03:00
Alexei Sholik 9f0f00c5de Implement drop_while 2012-03-30 18:17:27 +03:00
José Valim d815788c52 Compile files using . and inside __MAIN__ 2012-03-25 18:48:20 +02:00
Anthony Grimes d6cbc3b602 Default to binary instead in join. 2012-03-24 15:05:50 -05:00
Anthony Grimes 7a42b00284 Default joiner to an empty list in join. 2012-03-24 02:32:37 -05:00
José Valim 98b2d8a719 Add split and take to enum. 2012-02-27 13:37:04 +01:00
José Valim 207ee65108 Add Enum.drop and Enum.entries. 2012-02-27 09:06:14 +01:00
José Valim 7927805bb0 Add Enum.partition 2012-02-26 11:47:11 +01:00
José Valim a5a0fd0db5 Process.erase -> Process.delete 2012-02-25 13:25:22 +01:00
José Valim af69c09c07 Import all funs from Erlang. 2012-02-14 13:49:01 +01:00
José Valim 3a06259951 Convert from def test_rest to test :rest 2012-02-13 16:56:11 +01:00
José Valim 338643a85d Add Enum.filter_map 2012-02-12 13:16:48 +01:00
José Valim c29886b465 Get rid of for loops. 2012-02-12 13:02:15 +01:00
José Valim 1ade083916 Enum.foldl -> Enum.reduce 2012-02-12 12:55:24 +01:00
José Valim bfcc00cf9a Add docs and tests for keyfind. 2012-02-12 12:51:16 +01:00
José Valim 8ac6b46e72 Enum.detect -> Enum.find 2012-02-12 12:33:23 +01:00
José Valim fc558ff8ef Added match? to builtin macros. 2012-02-12 12:32:36 +01:00
José Valim fd76688221 Restrict the binary protocol. 2012-02-12 08:32:00 +01:00
Rafael Mendonça França 1991d8669c Use new assertions on tests 2012-02-12 00:22:52 -02:00
Rafael Mendonça França eb5e247bd8 Enum.times start form 1
Closes #115
2012-02-11 17:37:57 -02:00
José Valim 39b1442ffb Clean up function syntax. 2012-02-06 23:28:48 +01:00
José Valim 41d2a7f87e Revert "Rename tuples { 1, 2, 3 } to %{ 1, 2, 3 } to remove ambiguity."
This reverts commit 20f524dae2.
2012-02-06 22:46:24 +01:00
José Valim 20f524dae2 Rename tuples { 1, 2, 3 } to %{ 1, 2, 3 } to remove ambiguity. 2012-02-06 16:39:55 +01:00
José Valim fdda906ffd Add Process module 2012-01-29 16:26:13 +01:00
José Valim 86424ec776 Reduce the list of non-overridable macros. 2012-01-23 10:08:51 +01:00
José Valim 75dc5b02ee Add Enum#times. 2012-01-18 15:51:15 +01:00