Commit Graph
80 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 b78c27b6af Ensure in with match can be mixed with guards 2012-04-30 12:20:58 +02:00
José Valim 4ba1769fe9 Add Keyword.from_enum and Enum.qsort 2012-04-29 13:54:24 +02:00
José Valim 5a195114da Move files to lib/ 2012-04-28 16:19:43 +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 e261aabc37 Remove the paragraph about custom iterator 2012-04-26 09:47:06 +03:00
Alexei Sholik 707d2c84bf Reimplement the Enum iterator 2012-04-26 09:45:14 +03:00
Alexei Sholik 327c0a49a4 assert_raises -> assert_raise 2012-04-26 09:04:16 +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 bf28eb08a5 Review the docs for Enum functions 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 ffa5c3964d Provide a new protocol API, closes #251 2012-04-25 09:19:55 +02:00
José Valim 2aa72dfd6b Print a warning if defaults are used with multiple clauses, closes #209. 2012-04-21 18:28:39 +02:00
Alexei Sholik eef4a624f5 Fix erroneous names in docstrings 2012-04-13 01:40:02 +03:00
Alexei Sholik 6f5611317a Reword the explanation of Iterator 2012-03-30 21:55:12 +03:00
Alexei Sholik f6ed7f8cd8 More doc string fixes in Enum 2012-03-30 18:32:54 +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
Alexei Sholik 0be9278948 Review doc strings and examples in Enum 2012-03-30 18:17:27 +03:00
José Valim 20fc942451 Show the top of iteration should be passed. 2012-03-30 16:49:30 +02:00
José Valim 5bee300db2 Fix some docs. 2012-03-26 21:30:12 +02:00
José Valim 1230f86e7c Remove automatic aliases from defmodule. 2012-03-25 22:29:41 +02:00
José Valim d815788c52 Compile files using . and inside __MAIN__ 2012-03-25 18:48:20 +02:00
Anthony Grimes 4da39fc106 Update join's docs. 2012-03-24 15:13:29 -05: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 19066ba20e Get rid of special __EXCEPTION__ and __STOP_ITERATOR__ tokens. 2012-03-07 10:00:36 +01:00
José Valim 98b2d8a719 Add split and take to enum. 2012-02-27 13:37:04 +01:00
José Valim 2114707857 Move to new docs format. 2012-02-27 09:34:07 +01:00
José Valim f05b380f18 Fix iterator protocol so it doesn't need to track the first token. 2012-02-27 09:20:51 +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 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 f5c1a7ae47 Use & for partial application instead of _. 2012-02-12 12:19:21 +01:00
José Valim d42b952e99 Include a Record segment in Protocols. 2012-02-12 08:57:39 +01:00