mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
Merge remote-tracking branch 'upstream/stable' into merge_stable
This commit is contained in:
commit
e90b14edc9
3 changed files with 0 additions and 41 deletions
|
@ -1,24 +0,0 @@
|
|||
New function `bind` in `std.functional`
|
||||
|
||||
It is used to pass the fields of a struct as arguments to a function. For
|
||||
example, it can be used in a range pipeline to give names to the elements of a
|
||||
$(REF Tuple, std, typecons):
|
||||
|
||||
---
|
||||
import std.stdio;
|
||||
import std.range;
|
||||
import std.algorithm;
|
||||
import std.functional;
|
||||
|
||||
void printWithLineNumbers(File f)
|
||||
{
|
||||
f.byLine
|
||||
.enumerate
|
||||
.each!(bind!((num, line) {
|
||||
writefln("%8d %s", num, line);
|
||||
}));
|
||||
}
|
||||
---
|
||||
|
||||
See $(REF_ALTTEXT the standard library documentation, bind, std, functional)
|
||||
for more information.
|
|
@ -1,14 +0,0 @@
|
|||
`Nullable` in `std.typecons` can now act as a range
|
||||
|
||||
`Nullable` now offers an alternative 0 or 1 element range interface.
|
||||
|
||||
---
|
||||
import std.stdio;
|
||||
import std.algorithm;
|
||||
import std.typecons;
|
||||
|
||||
void printValues(Nullable!int[] values)
|
||||
{
|
||||
values.joiner.each!writeln();
|
||||
}
|
||||
---
|
|
@ -1,3 +0,0 @@
|
|||
Zlib updated to 1.2.12
|
||||
|
||||
The bundled zlib has been updated to version 1.2.12.
|
Loading…
Add table
Add a link
Reference in a new issue