File: package.d

package info (click to toggle)
ldc 1%3A1.41.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 64,576 kB
  • sloc: cpp: 91,105; ansic: 23,829; makefile: 1,518; sh: 1,056; asm: 724; objc: 135; exp: 50; python: 12
file content (85 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/++
Convenience file that allows to import entire Phobos in one import.
+/
module std;

///
@safe unittest
{
    import std;

    int len;
    const r = 6.iota
              .filter!(a => a % 2) // 1 3 5
              .map!(a => a * 2) // 2 6 10
              .tee!(_ => len++)
              .substitute(6, -6) // 2 -6 10
              .sum
              .reverseArgs!format("Sum: %d");

    assert(len == 3);
    assert(r == "Sum: 6");
}

///
@safe unittest
{
    import std;
    assert(10.iota.map!(a => pow(2, a)).sum == 1023);
}

public import
 std.algorithm,
 std.array,
 std.ascii,
 std.base64,
 std.bigint,
 std.bitmanip,
 std.checkedint,
 std.compiler,
 std.complex,
 std.concurrency,
 std.container,
 std.conv,
 std.csv,
 std.datetime,
 std.demangle,
 std.digest,
 std.encoding,
 std.exception,
 std.file,
 std.format,
 std.functional,
 std.getopt,
 std.int128,
 std.json,
 std.logger,
 std.math,
 std.mathspecial,
 std.meta,
 std.mmfile,
 std.net.curl,
 std.net.isemail,
 std.numeric,
 std.parallelism,
 std.path,
 std.process,
 std.random,
 std.range,
 std.regex,
 std.signals,
 std.socket,
 std.stdint,
 std.stdio,
 std.string,
 std.sumtype,
 std.system,
 std.traits,
 std.typecons,
 std.uni,
 std.uri,
 std.utf,
 std.uuid,
 std.variant,
 std.zip,
 std.zlib;