José Valim
538b830c3e
Update record and stream docs (tks @pragdave)
2013-12-12 11:20:39 +01:00
José Valim
3ac57066ce
Add Stream.scan/2 and Stream.scan/3
2013-12-11 15:01:28 +01:00
José Valim
db19cdea42
Add Stream.uniq/2
2013-12-11 15:01:28 +01:00
José Valim
2d7965b7e6
Add Stream.chunks/2,3,4
2013-12-11 15:01:28 +01:00
José Valim
4a2d1d6555
Add Stream.chunks_by/2
2013-12-11 15:01:28 +01:00
José Valim
1b93904a27
Support Stream.drop/2 with negative count
2013-12-11 15:01:28 +01:00
José Valim
303789fc93
Support Stream.take/2 with negative count
2013-12-11 15:01:28 +01:00
José Valim
3c6417896e
Add Stream.take_every/2
2013-12-11 15:01:28 +01:00
José Valim
23a4fc65fe
Add Stream.each/2
2013-12-11 15:01:28 +01:00
José Valim
575e0b9494
Start sharing reducers in between Enum/Stream
2013-12-11 15:01:28 +01:00
José Valim
e49998593e
Change Enumerable.count/1 and Enumerable.member?/2 to return tagged tuples
...
The motivation behind this change is to not force every application
to implement count/1 and member?/2 manually. It also allows us in
the future to add functions like Enum.counted?/1 that will return
true if count is pre-calculated.
2013-12-11 15:01:27 +01:00
José Valim
33c6eb3e37
Ensure certain streams and enumerables are zippable
2013-12-11 15:01:27 +01:00
José Valim
405c14f7e1
Add Stream.zip/2
2013-12-11 15:01:27 +01:00
José Valim
b26304fa59
Improve docs
2013-12-11 15:01:27 +01:00
José Valim
1c834e8938
Make the reducer function part of the suspended continuation
2013-12-11 15:01:27 +01:00
José Valim
8e51528dc1
Convert to new iteratee-based enumeration
...
Details are described in the Enumerable docs.
This new implementation allows us to implement interleaving
functions (like zip) while avoiding a huge penalty in regular
enumeration.
2013-12-11 15:01:27 +01:00
meh
a8959f3987
Fix Version.match? with ~> and -dev versions
2013-12-10 17:51:39 +01:00
José Valim
bce9116cff
Ensure full alias is stored in context_modules
2013-12-10 15:15:28 +01:00
José Valim
b78c3bc36b
Add Stream.resource/3
2013-12-09 18:14:34 +01:00
José Valim
34c2c50f42
Merge pull request #1916 from augiedb/master
...
Add examples to URI
2013-12-08 00:32:56 -08:00
Augie De Blieck Jr.
6f219ad1da
Clean up formatting error
2013-12-07 23:22:03 -05:00
Augie De Blieck Jr.
2487d741b6
Add examples to url.ex
...
Examples for encode_query, encode, decode, decode_query, query_decoder, and parse.
2013-12-07 23:20:18 -05:00
José Valim
f62c26b9b6
Ensure record aliases in the same quote can be accessed, closes #1915
...
This commit also simplifies macro expansion for both imports and aliases
to always give higher preference to the macro environment rather than
the caller one, if such is available. The deal is to simplify both the
code and understanding of how macros work.
2013-12-07 20:01:11 +01:00
Augie De Blieck Jr.
827507603a
A series of minor description text changes for clarity and consistency.
...
Lines 909 and 259 were missing words. Other changes are made for minor grammatical clarity and consistency.
2013-12-05 22:56:10 -05:00
José Valim
0977602647
Create consolidation directory before writing to it
2013-12-04 12:02:22 +00:00
John Warwick
fa56d91c08
Cleaning up Macro docs
2013-12-03 14:54:45 -05:00
José Valim
5dfa6ae618
Ensure macro expansion does not expand on variables
2013-12-02 13:00:41 +01:00
José Valim
1fbb6871a0
Add more hygiene examples
2013-12-02 06:53:44 +01:00
Miroslav Prymek
60c4ede916
Fixed docstrings in URI
2013-12-01 00:28:18 +01:00
John Warwick
c1bedd5dce
Cleaning up Exception docs (and other Kernel doc typos)
2013-11-30 14:31:42 -05:00
José Valim
e424f02812
Ensure aliases defined in macros do not leak
2013-11-30 18:02:46 +01:00
José Valim
7dd9da12a7
Promote exception/1 as the best mechanism to customize exceptions
...
The previous mechanism of lazily customizing message/1 was very
dangerous, as you could have errors while calculating the message
and those would shop up just when the exception is printed, leading
to further breakage.
Closes #1747
2013-11-30 11:59:51 +01:00
José Valim
9ee79a16bb
Deprecate Macro.extract_args/1
2013-11-29 23:24:44 +01:00
José Valim
00431ebecb
Warnings rely on stdio and should be sync
2013-11-29 22:37:48 +01:00
José Valim
203ddd0c37
Merge pull request #1837 from zambal/decompose_call
...
Add Macro.decompose_call/1
2013-11-29 13:37:40 -08:00
Kresten Krab Thorup
6a7609d707
test cleanup as per comments
2013-11-29 14:30:10 +01:00
Kresten Krab Thorup
ec6f95d970
More precise regex exception match
...
This is for Erjang, which generates different
exception messages
2013-11-29 13:41:39 +01:00
José Valim
0e54cad8ee
Merge pull request #1901 from ericmj/defrecordp-dynamic
...
defrecordp support dynamic name and fields
2013-11-29 03:50:37 -08:00
José Valim
c093e378d8
Merge pull request #1900 from krestenkrab/krab-unicode
...
In response to "The string type is broken"
2013-11-29 03:49:18 -08:00
José Valim
a829da1775
Reduce the size of String.Graphemes module
...
Based on a suggestion @krestenkrab and an initial implementation
proposed in #1902 , we can reduce the total size of the String.Graphemes
beam file by ensuring the function clauses for next_grapheme are
similar.
We have done this by implementing next_grapheme in a tail recursive
fashion and using binary_part to select the first bits. The end result
is a consistently 33% faster graphemes operation for ascii strings
and only 10% slower operation for heavy unicode strings (which may
be further optimazable).
2013-11-29 12:48:01 +01:00
Eric Meadows-Jonsson
7d83083525
defrecordp support dynamic name and fields
2013-11-29 12:25:16 +01:00
Eric Meadows-Jonsson
9a0e8f38de
Remove record_test from eunit suite
2013-11-29 01:42:37 +01:00
Eric Meadows-Jonsson
ffb2258bb1
@type and friends support unquote fragments
2013-11-28 23:01:00 +01:00
Kresten Krab Thorup
d95a7d1a58
Fix comment
2013-11-28 16:46:17 +01:00
Kresten Krab Thorup
3a8d0ccbc2
Some more unicode tests
...
Since this blog post [1] caused some stir, I added
tests corresponding to how most languages referred
to are broken. Naturally, that's not the case for
Elixir.
[1] http://mortoray.com/2013/11/27/the-string-type-is-broken/
2013-11-28 14:35:09 +01:00
José Valim
4ed4f52121
Fix regression when using in with module attributes
2013-11-28 13:56:37 +01:00
Eric Meadows-Jonsson
89c4822fa0
Add typespecs to List
2013-11-26 22:55:57 +01:00
Eric Meadows-Jonsson
1f4037b93c
Add List.update_at/3
2013-11-26 22:55:57 +01:00
Greg Vaughn
52cd9b359c
fix for issue #1896
...
If the enumerable is an even multiple of the counter (n) and an explicit
pad is given, you get an extra element.
Enum.chunks([1,2,3], 3)
iex> [[1,2,3]]
as expected, but
Enum.chunks([1,2,3], 3, 3, [""])
iex> [[1,2,3],[""]]
as not expected
2013-11-26 13:33:48 -06:00
José Valim
09869ec135
Improve typespecs when formatted as strings
2013-11-26 09:15:39 +01:00