<commit_before>`e versions-used
D 2.066.0
`e show-version
`$[dmd -v]
`e implicit-prologue
`e hello-world
`$[cat hello.d]
`*import std.stdio;

`*void main() {
  writeln(`=["Hello world!"]);
}
`e file-suffixes
foo.d
`e interpreter
`c[sort of]
`$[dmd -run foo.d]
`e block-delimiters
{ }
`e statement-terminator
;
`e top-level-statements
`e end-of-line-comment
// comment
`e multiple-line-comment
/* comment
another comment */
`e local-variable
`*int i;
`*int j = 3;
`e uninitialized-local-variable
`e global-variable
`e uninitialized-global-variable
`e constant
`c[compile-time/manifest constant:]
`*enum `*int i = 7;
`c[must be constant in the entire program:]
`*immutable `*int j = 7;
`c[not changeable through this pointer:]
`*const `*int k = 7;
`e assignment
`*int n;

n = 3;
`e compound-assignment-arithmetic-string-logical-bit
`+[+= -= *= /= %= ^^=]
`+[<<= >>= &= ^= |=]
`e increment-and-decrement
`*int n = 1;
`*int one = n++;
`*int three = ++n;
`*int two = --n;
`e address
`e dereference
`e type-size
(`*int*).sizeof
`e address-arithmetic

`e unique-pointer

`e reference-count-pointer

`e weak-pointer

`e allocate-heap
`e uninitialized-heap
`e free-heap
`e null
`*null
`e nullable-type
`*import std.typecons;
Nullable!T
`c[usage:]
Nullable!`*int a;
a = 5;
a.nullify(); `c[set to null]
`e null test
v `*is `*null
`c[Nullable!T:]
v.isNull
`e coalesce
`e conditional-expression
x > 0 ? x : -x
`e boolean-type
`*bool
`e true-and-false
`=true `=false
`e falsehoods
`=false `=0 `=[0.0] `.NULL
`e logical-operators
`+[&& || !]
`e relational-operators
`+[== != < > <= >=]
`+[!<>= <> <>= !<= !< !>= !> !<>] `c[handles NaN differently]
`*is `+!`*is
`e integer-type
`*byte n1;  `c[1 byte]
`*short n2; `c[2 bytes]
`*int n3;   `c[4 bytes]
`*long n4;  `c[8 bytes]
`e unsigned-type
`*ubyte n1;  `c[1 byte]
`*ushort n2; `c[2 bytes]
`*uint n3;   `c[4 bytes]
`*ulong n4;  `c[8 bytes]
`e float-type
`*float x1;  `c[4 bytes]
`*double x2; `c[8 bytes]
`*real x3;   `c[largest in hardware]
`e fixed-type
`c[none]
`e arithmetic-operators
`+[+ - * / % ^^]
`e integer-division
`c[evaluates to 2:]
7 / 3
`e integer-division-by-zero
`e float-division
`e float-division-by-zero
positive dividend: `*double.infinity
zero dividend: `*double.nan
negative dividend: -`*double.infinity
`e power
`=2 `+[^^] `=20
`=[2.0] `+[^^] `=[32.0]
`e sqrt
`e sqrt-1
nan
`e transcendental-functions
`*import std.math;

exp log log2 log10
sin cos tan
asin acos atan
atan2
`e transcendental-constants
`*import std.math;

E PI
`e float-truncation
`*double x = 3.7;

`*long trnc = `*cast(`*long)(x);
`e absolute-value-and-signum
`e integer-overflow
modular arithmetic, see http://dlang.org/expression.html#AddExpression
`e float-overflow
IEEE 754
`e float-limits-largest-finite-float-smallest-positive-float
`*float.max
`*float.min_normal
`*double.max
`*double.min_normal
`*real.max
`*real.min_normal
`e complex-construction
`c[built-in (deprecated])
`*cfloat c = 1 + 3.14 * 1.0i;
`*cdouble z = 1 + 3.14 * 1.0i;

`c[modern]
`*import std.complex;

`*auto c = complex(2.0);
`*auto z = complex(1, 3.14L);
`e complex-decomposition
`c[built-in (deprecated])

`c[modern]
z.re
z.im
`e random-number-uniform-integer-uniform-float-normal-float
`e random-seed
`e bit-operators
<< >> & | ^ ~
`e binary-octal-and-hex-literals
`=[0b0101010]
`=[052]
`=[0x2a]
`e radix-convert-integer-to-and-from-string-with-radix

`e string-type
`*char[] s = "lorem ipsum";
`e string-literal
`c[string, aka immutable char[]:]
`=["don't say `%[\"]no`%[\"]"]
`e newline-in-literal
`e literal-escapes
`%[\a \b \f \n \r \t \v]
`%[\\ \" \']
`%[\xhh \o \oo \ooo]
`e allocate-string
`.string s = "hello";
`e are-strings-mutable
`c[no, but char[]s are:]
`*char[] s = `=["bar"].dup;

s[2] = `=['z'];
`e copy-string
`c[not necessary for strings since they're immutable, but]
`*const `*char[] s = `=["bar"];

`*char[] s2 = s.dup;
`*char[] s3 = s;

`c[s contains "baz"; s2 and s3 contain "bar":]
s[2] = `=['z'];
`e format
`e compare-strings
`+[== != < > <= >=]
`e concatenate-strings
`c[same as arrays:]
`.string s = "hello";
`.string s2 = s ~ " world";

s ~= " world";
`e replicate
`e translate-case
`e trim
`e pad
`e number-to-string
`*import std.conv;
to!`.string(14)
`e string-to-number
`*import std.conv;
to!`.int(14)
`e join
`e split
`e serialize
`e string-length
`*const `*char[] s = "hello";
`*int len = s.length;
`e index-of-substring
`e extract-substring
`e character-type
`*char
`*wchar
`*dchar
`e character-literal
`*char n = 'X';
`e test-character
`e regex-type
`e character-class-abbreviations
. \d \D \s \S \w \W
`e anchors
^ $ \b \B
`e lookahead-positive-negative
`e match-test
`e case-insensitive-match-test

`e modifiers

`e substitution

`e match-prematch-postmatch

`e group-capture

`e date-time-type

`e current-date-time

`e to-unix-epoch-from-unix-epoch

`e date-and-time-to-string

`e format-date

`e parse-date

`e date-subtraction

`e add-duration

`e date-parts

`e time-parts

`e declare-on-stack
`*int[10] a;
`e declare-on-heap
`*int[] a;
a.length = 10;
`e free-heap
`e array-initialization-list
`*int a[3] = [1, 2, 3];
`e array-size
`*int a[10];
a.length;
`e array-lookup
`*int first = a[0];
`e array-update
a[0] = 7;
`e array-out-of-bounds
RangeError if detected
`e copy
`e as-function-argument
`e array-iterate
int a[] = [ 3, 2, 4, 1 ];
`*foreach (i, e; a) {
  writeln("value at ", i, " is ", e);
}
`e array-sort
`*import std.algorithm;

`*bool comp(`*int a, `*int b) @safe `*pure `*nothrow {
  `*return a < b ? -1 : (a == b ? 0 : 1);
}

`*int[] arr = [3, 2, 1, 4];
sort!("a > b")(arr); `c[first pair of parens optional]
sort!(comp)(arr); `c[first pair of parens optional]
`e list-name
T[]
`e list-declare
`*int[] a;
`e list-literal
[1, 2, 3]
`e list-size
a.length
`e capacity-get-increase
a.capacity
a.capacity = 10;
`e empty-test-and-clear
`*bool isEmpty = a.empty;

a.length = `=0;
`e list-lookup
a[0]
`e list-update
a[2] = 4;
`e out-of-bounds
`e index-of-element
`e slice
`e drop
`e manipulate-back
`e manipulate-front
`e concatenate
`*int[] a = [1, 2, 3];
`*int[] b = [4, 5, 6];
`*int[] c = a1 ~ a2;
a1 ~= a2;
`e list-replicate
`e copy
`e array-as-function-argument
`e iterate-over-elements
`*int sum = 0;
`*int[3] a = [1, 2, 3];

`*foreach (n; a) {
  sum += n;
}
`e iterate-over-indices-and-elements
`*int[3] a = [6, 7, 8];
`*foreach (i, n; a) {
  writeln("value at ", i, " is ", n);
}
`e reverse
`e sort
`e dedupe
`e membership
`e intersection
`e union
`e relative-complement-symmetric-difference
`e map
`*import std.algorithm;
map!(x => x * x)([1, 2, 3]) `c[same as] [1, 2, 3].map!(x => x * x)
map!`=["a * a"]([1, 2, 3]) `c[same as] [1, 2, 3].map!`=["a * a"]
`c[these are lazy ranges; call .array to get an array]
`e filter
`*import std.algorithm;
filter!(x => x > 1)([1, 2, 3]) `c[same as] [1, 2, 3].filter!(x => x > 1)
filter!`=["a > 1"]([1, 2, 3]) `c[same as] [1, 2, 3].filter!`=["a > 1"]
`e min-and-max-element

`e shuffle-and-sample

`e zip

`e declare-pair
`*import std.typecons;
Tuple!(string, int) p1;
Tuple!(string, int) p2 = tuple(`=["foo"], `=7);
`e lookup-pair-elements
`*auto p = tuple("foo", 7);

p[0]
p[1]
`e update-pair-elements
p[0] = `=["bar"];
p[1] = `=8;
`e declare-tuple
Tuple!(string, `*int, `*float) tup1;
Tuple!(string, `*int, `*float) tup2 = tuple(`=["foo"], `=1, `=[3.7]);

`*auto tup3 = tuple("foo", 1, 3.7);
`e lookup-tuple-elements
tup3[0]
tup3[1]
tup3[2]
`e update-tuple-elements
tup3[0] = "bar";
`e tuple-size

`e create-references-for-tuple-elements

`e map-declaration
`*int[`*string] m;
`e map-access
m[`=["hello"]] = 5;
writeln(m[`=["hello"]]);
`e map-size
m.length
`e map-remove-element
`e map-element-not-found-result
`e map-iterate
`*foreach (k, v; m) {
  writeln(k, " ", v);
}
`e declare-function
`e define-function
`*int add(`*int m, `*int n) {
  `*return m + n;
}
`e invoke-function
`*int sum = add(3, 7);
`e define-static-class-method
`e default-argument
`e variable-number-of-arguments

`e named-parameters
`e pass-by-value
`*int add1(`*int n) {
  `*return ++n;
}

`*int i = 7;
`*int i2 = add1(i);
`e pass-by-reference
`*int add1(`*ref `*int n) {
  `*return ++n;
}

`*int i = 7;
`*int i2 = add1(i);
`e pass-by-address
`*int add1(`*int* n) {
  `*return ++*n;
}

`*int i = 7;
`*int i2 = add1(&i);
`e return-value
`e no-return-value
`e recursive-function
`*int factorial(`*int n) {
  `*if (n <= 1) {
    `*return 1;
  }
  `*return n * factorial(n - 1);
}
`e lambda
`e invoke-anonymous-function
`e closure
`e function-with-private-state
`e function-as-value
`e overload-operator
`*ref Rational opBinary(`*string op)(`*in Rational o)
  `*if (op == "+") { `c[compile-time test]
    `*return Rational(`*this.num * o.denom + o.num * `*this.denom, `*this.denom * o.denom);
}
`e if
`*int signum;
`*if (n > 0) {
  signum = 1;
} `*else `*if (n == 0) {
  signum = 0;
} `*else {
  signum = -1;
}
`e dangling-else
`e switch
`*const `*int INVALID_BINARY_DIGIT = -`=1;
`*int bin_digit;

`*switch(n) {
`*case `=0, `=1:
  bin_digit = n;
  `*break;
`*default:
  bin_digit = INVALID_BINARY_DIGIT;
  `*break;
}
`e while
`*int i = 1, fact = 1, n = 10;

`*while (i < n) {
  fact *= i;
  ++i;
}
`e for
`*int fact;
`*for (i; 1 .. 11) { `c[half-open]
  fact *= i;
}
`e break
`e break-out-of-nested-loops
`e continue
`e goto
`e base-exception
`e predefined-exceptions
`e handle-exception
`e define-exception
`e re-raise-exception
`e catch-all-handler
`e multiple-handlers
`e uncaught-exception-behavior
`e error-message
`e system-call-errno
`e finally
`e exception-specification
`e start-thread
`e terminate-current-thread
`e terminate-other-thread
`e list-threads
`e wait-on-thread
`e lock
`e create-message-queue
`e send-message
`e receive-message
`e standard-file-handles
stdin
stderr
stdout
`e read-line-from-stdin
`*string line = readln();
`e write-line-to-stdout
writeln("Hello, world!");
`e printf
writef("count: `%[%d\n]", `=7);
writefln("count: %d", `=7);
`e read-from-file
`e write-to-file
`e file-exists-test-regular-test
`e file-size
`e is-file-readable-writable-executable
`e set-file-permissions
`e copy-file-remove-file-rename-file
`e csv
`e json
`e build-xml
`e parse-xml
`e parse-html
`e build-pathname
`e dirname-and-basename
`e absolute-pathname
`e iterate-over-directory-by-file
`e glob-paths
`e make-directory
`e recursive-copy
`e remove-empty-directory
`e remove-directory-and-contents
`e directory-test
`e generate-unused-directory-name
`e system-temporary-file-directory
`e signature-of-main
`e first-argument
`e environment-variable
`e iterate-through-environment-variables
`e standard-library-name
`e declare-namespace
`e multiple-namespaces-per-file
`e namespaces-map-to-directories
`e import-namespace
`e import-part-of-namespace
`e import-symbol
`e import-static-symbol
`e import-position
`e using-a-symbol-that-hasn-t-been-imported
`e application-environment
`e multiple-installations
`e package-manager
`e type-synonym
`*alias customer_id = `*int;
customer_id cid = `=3;
`e enum
`*enum DayOfWeek { Mon, Tue, Wed, Thu, Fri, Sat, Sun}
DayOfWeek d = Tue;
`e struct-definition
`*class MedalCount {
  `*string country;
  `*int gold;
  `*int silver;
  `*int bronze;
}
`e struct-declaration
MedalCount spain;
`e struct-initialization
MedalCount spain = MedalCount("Spain", 3, 7, 4);
`e struct-member-assignment
spain.country = "Spain";
spain.gold = 3;
spain.silver = 7;
spain.bronze = 4;
`e struct-member-access
`*int spain_total = spain.gold + spain.silver + spain.bronze;
`e define-generic-type
`e instantiate-generic-type
`e generic-function
`e generic-array
`e value-parameter
`e template-parameter
`e template-specialization
`e multiple-type-parameters
`e generic-type-parameters
`e template-parameters
`e variadic-template
`e semantics-of
value comparison
`e define-class
`e class-definition-location
`e constructor
`e create-object
`e destructor
`e destroy-object
`e define-method
`e invoke-method
`e define-class-method
`e invoke-class-method
`e name-of-receiver
`e access-control
`e anonymous-class
`e dynamic-dispatch
`e static-dispatch
`e subclass
`e invoking-superclass-constructor
`e mark-class-underivable-or-method-unoverrideable
`e root-class
`e root-class-methods
`e get-type-class-of-object
`e get-type-class-from-string
`e get-type-class-from-type-identifier
`e class-name
`e get-methods
`e has-method
`e invoke-method-object
`e get-local-hostname-dns-lookup-reverse-dns-lookup
`e http-get
`e http-post
`e absolute-url
`e parse-url
`e url-encode-decode
`e base64-encode-decode
`e test-class
`e run-all-tests
`e equality-assertion
`e approximate-assertion
`e exception-assertion
`e setup
`e teardown
`e stronger-warnings
`e suppress-warnings
`e treat-warnings-as-errors
`e run-debugger
`e debugger-commands-help-list-source-re-load-executable-next-step-set-breakpoint-show-breakpoints-delete-breakpoint-continue-backtrace-up-stack-down-stack-print-run-quit
`e benchmark-code
`e profile-code
`e memory-tool
<commit_msg>some D changes I made sometime<commit_after>`e versions-used
D 2.066.0
`e show-version
`$[dmd -v]
`e implicit-prologue
`e hello-world
`$[cat hello.d]
`*import std.stdio;

`*void main() {
  writeln(`=["Hello world!"]);
}
`e file-suffixes
foo.d
`e interpreter
`c[sort of]
`$[dmd -run foo.d]
`e block-delimiters
{ }
`e statement-terminator
;
`e top-level-statements
`e end-of-line-comment
// comment
`e multiple-line-comment
/* comment
another comment */
`e local-variable
`*int i;
`*int j = 3;
`e uninitialized-local-variable
`e global-variable
`e uninitialized-global-variable
`e constant
`c[compile-time/manifest constant:]
`*enum `*int i = 7;
`c[must be constant in the entire program:]
`*immutable `*int j = 7;
`c[not changeable through this pointer:]
`*const `*int k = 7;
`e assignment
`*int n;

n = 3;
`e compound-assignment-arithmetic-string-logical-bit
`+[+= -= *= /= %= ^^=]
`+[<<= >>= &= ^= |=]
`e increment-and-decrement
`*int n = 1;
`*int one = n++;
`*int three = ++n;
`*int two = --n;
`e address
`e dereference
`e type-size
(`*int*).sizeof
`e address-arithmetic

`e unique-pointer

`e reference-count-pointer

`e weak-pointer

`e allocate-heap
`e uninitialized-heap
`e free-heap
`e null
`*null
`e nullable-type
`*import std.typecons;
Nullable!T
`c[usage:]
Nullable!`*int a;
a = 5;
a.nullify(); `c[set to null]
`e null test
v `*is `*null
`c[Nullable!T:]
v.isNull
`e coalesce
`e conditional-expression
x > 0 ? x : -x
`e boolean-type
`*bool
`e true-and-false
`=true `=false
`e falsehoods
`=false `=0 `=[0.0] `.NULL
`e logical-operators
`+[&& || !]
`e relational-operators
`+[== != < > <= >=]
`+[!<>= <> <>= !<= !< !>= !> !<>] `c[handles NaN differently]
`*is `+!`*is
`e integer-type
`*byte n1;  `c[1 byte]
`*short n2; `c[2 bytes]
`*int n3;   `c[4 bytes]
`*long n4;  `c[8 bytes]
`e unsigned-type
`*ubyte n1;  `c[1 byte]
`*ushort n2; `c[2 bytes]
`*uint n3;   `c[4 bytes]
`*ulong n4;  `c[8 bytes]
`e float-type
`*float x1;  `c[4 bytes]
`*double x2; `c[8 bytes]
`*real x3;   `c[largest in hardware]
`e fixed-type
`c[none]
`e arithmetic-operators
`+[+ - * / % ^^]
`e integer-division
`c[evaluates to 2:]
7 / 3
`e integer-division-by-zero
`e float-division
`e float-division-by-zero
positive dividend: `*double.infinity
zero dividend: `*double.nan
negative dividend: -`*double.infinity
`e power
`=2 `+[^^] `=20
`=[2.0] `+[^^] `=[32.0]
`e sqrt
`e sqrt-1
nan
`e transcendental-functions
`*import std.math;

exp log log2 log10
sin cos tan
asin acos atan
atan2
`e transcendental-constants
`*import std.math;

E PI
`e float-truncation
`*double x = 3.7;

`*long trnc = `*cast(`*long)(x);
`e absolute-value-and-signum
`e integer-overflow
modular arithmetic, see http://dlang.org/expression.html#AddExpression
`e float-overflow
IEEE 754
`e float-limits-largest-finite-float-smallest-positive-float
`*float.max
`*float.min_normal
`*double.max
`*double.min_normal
`*real.max
`*real.min_normal
`e complex-construction
`c[built-in (deprecated])
`*cfloat c = 1 + 3.14 * 1.0i;
`*cdouble z = 1 + 3.14 * 1.0i;

`c[modern]
`*import std.complex;

`*auto c = complex(2.0);
`*auto z = complex(1, 3.14L);
`e complex-decomposition
`c[built-in (deprecated])

`c[modern]
z.re
z.im
`e random-number-uniform-integer-uniform-float-normal-float
`e random-seed
`e bit-operators
<< >> & | ^ ~
`e binary-octal-and-hex-literals
`=[0b0101010]
`=[052]
`=[0x2a]
`e radix-convert-integer-to-and-from-string-with-radix

`e string-type
`*char[] s = "lorem ipsum";
`e string-literal
`c[string, aka immutable char[]:]
`=["don't say `%[\"]no`%[\"]"]
`e newline-in-literal
`e literal-escapes
`%[\a \b \f \n \r \t \v]
`%[\\ \" \']
`%[\xhh \o \oo \ooo]
`e allocate-string
`.string s = "hello";
`e are-strings-mutable
`c[no, but char[]s are:]
`*char[] s = `=["bar"].dup;

s[2] = `=['z'];
`e copy-string
`c[not necessary for strings since they're immutable, but]
`*const `*char[] s = `=["bar"];

`*char[] s2 = s.dup;
`*char[] s3 = s;

`c[s contains "baz"; s2 and s3 contain "bar":]
s[2] = `=['z'];
`e format
`e compare-strings
`+[== != < > <= >=]
`e concatenate-strings
`c[same as arrays:]
`.string s = "hello";
`.string s2 = s ~ " world";

s ~= " world";
`e replicate
`e translate-case
`e trim
`e pad
`e number-to-string
`*import std.conv;
to!`.string(14)
`e string-to-number
`*import std.conv;
to!`.int(14)
`e join
`e split
`e serialize
`e string-length
`*const `*char[] s = "hello";
`*int len = s.length;
`e index-of-substring
`e extract-substring
`e character-type
`*char
`*wchar
`*dchar
`e character-literal
`*char n = 'X';
`e test-character
`e regex-type
`e character-class-abbreviations
. \d \D \s \S \w \W
`e anchors
^ $ \b \B
`e lookahead-positive-negative
`e match-test
`e case-insensitive-match-test

`e modifiers

`e substitution

`e match-prematch-postmatch

`e group-capture

`e date-time-type

`e current-date-time

`e to-unix-epoch-from-unix-epoch

`e date-and-time-to-string

`e format-date

`e parse-date

`e date-subtraction

`e add-duration

`e date-parts

`e time-parts

`e declare-on-stack
`*int[10] a;
`e declare-on-heap
`*int[] a;
a.length = 10;
`e free-heap
`e array-initialization-list
`*int a[3] = [1, 2, 3];
`e array-size
`*int a[10];
a.length;
`e array-lookup
`*int first = a[0];
`e array-update
a[0] = 7;
`e array-out-of-bounds
RangeError if detected
`e copy
`e as-function-argument
`e array-iterate
int a[] = [ 3, 2, 4, 1 ];
`*foreach (i, e; a) {
  writeln("value at ", i, " is ", e);
}
`e array-sort
`*import std.algorithm;

`*bool comp(`*int a, `*int b) @safe `*pure `*nothrow {
  `*return a < b ? -1 : (a == b ? 0 : 1);
}

`*int[] arr = [3, 2, 1, 4];
sort!("a > b")(arr); `c[first pair of parens optional]
sort!(comp)(arr); `c[first pair of parens optional]
`e list-name
T[]
`e list-declare
`*int[] a;
`e list-literal
[1, 2, 3]
`e list-size
a.length
`e capacity-get-increase
a.capacity
a.capacity = 10;
`e empty-test-and-clear
`*bool isEmpty = a.empty;

a.length = `=0;
`e list-lookup
a[0]
`e list-update
a[2] = 4;
`e out-of-bounds
`e index-of-element
`e slice
`e drop
`e manipulate-back
`e manipulate-front
`e concatenate
`*int[] a = [1, 2, 3];
`*int[] b = [4, 5, 6];
`*int[] c = a1 ~ a2;
a1 ~= a2;
`e list-replicate
`e copy
`e array-as-function-argument
`e iterate-over-elements
`*int sum = 0;
`*int[3] a = [1, 2, 3];

`*foreach (n; a) {
  sum += n;
}
`e iterate-over-indices-and-elements
`*int[3] a = [6, 7, 8];
`*foreach (i, n; a) {
  writeln("value at ", i, " is ", n);
}
`e iterate-over-range
`*foreach (i; 1..1000001) {
  `c[code]
}
`e instantiate-range-as-list
`*import std.range;
`*auto a = iota(1, 11).array; `c[1, 2, ..., 10]
iota(11) `c[0, 1, 2, ..., 10]
iota(1, 11, 2) `c[1, 3, 5, 7, 9]
`e reverse
`e sort
`e dedupe
`e membership
`e intersection
`e union
`e relative-complement-symmetric-difference
`e map
`*import std.algorithm;
map!(x => x * x)([1, 2, 3]) `c[same as] [1, 2, 3].map!(x => x * x)
map!`=["a * a"]([1, 2, 3]) `c[same as] [1, 2, 3].map!`=["a * a"]
`c[these are lazy ranges; call .array to get an array]
`e filter
`*import std.algorithm;
filter!(x => x > 1)([1, 2, 3]) `c[same as] [1, 2, 3].filter!(x => x > 1)
filter!`=["a > 1"]([1, 2, 3]) `c[same as] [1, 2, 3].filter!`=["a > 1"]
`e min-and-max-element

`e shuffle-and-sample

`e zip

`e declare-pair
`*import std.typecons;
Tuple!(string, int) p1;
Tuple!(string, int) p2 = tuple(`=["foo"], `=7);
`e lookup-pair-elements
`*auto p = tuple("foo", 7);

p[0]
p[1]
`e update-pair-elements
p[0] = `=["bar"];
p[1] = `=8;
`e declare-tuple
Tuple!(string, `*int, `*float) tup1;
Tuple!(string, `*int, `*float) tup2 = tuple(`=["foo"], `=1, `=[3.7]);

`*auto tup3 = tuple("foo", 1, 3.7);
`e lookup-tuple-elements
tup3[0]
tup3[1]
tup3[2]
`e update-tuple-elements
tup3[0] = "bar";
`e tuple-size

`e create-references-for-tuple-elements

`e map-declaration
`*int[`*string] m;
`e map-access
m[`=["hello"]] = 5;
writeln(m[`=["hello"]]);
`e map-size
m.length
`e map-remove-element
`e map-element-not-found-result
`e map-iterate
`*foreach (k, v; m) {
  writeln(k, " ", v);
}
`e declare-function
`e define-function
`*int add(`*int m, `*int n) {
  `*return m + n;
}
`e invoke-function
`*int sum = add(3, 7);
`e define-static-class-method
`e default-argument
`e variable-number-of-arguments

`e named-parameters
`e pass-by-value
`*int add1(`*int n) {
  `*return ++n;
}

`*int i = 7;
`*int i2 = add1(i);
`e pass-by-reference
`*int add1(`*ref `*int n) {
  `*return ++n;
}

`*int i = 7;
`*int i2 = add1(i);
`e pass-by-address
`*int add1(`*int* n) {
  `*return ++*n;
}

`*int i = 7;
`*int i2 = add1(&i);
`e return-value
`e no-return-value
`e recursive-function
`*int factorial(`*int n) {
  `*if (n <= 1) {
    `*return 1;
  }
  `*return n * factorial(n - 1);
}
`e lambda
`e invoke-anonymous-function
`e closure
`e function-with-private-state
`e function-as-value
`e overload-operator
`*ref Rational opBinary(`*string op)(`*in Rational o)
  `*if (op == "+") { `c[compile-time test]
    `*return Rational(`*this.num * o.denom + o.num * `*this.denom, `*this.denom * o.denom);
}
`e if
`*int signum;
`*if (n > 0) {
  signum = 1;
} `*else `*if (n == 0) {
  signum = 0;
} `*else {
  signum = -1;
}
`e dangling-else
`e switch
`*const `*int INVALID_BINARY_DIGIT = -`=1;
`*int bin_digit;

`*switch(n) {
`*case `=0, `=1:
  bin_digit = n;
  `*break;
`*default:
  bin_digit = INVALID_BINARY_DIGIT;
  `*break;
}
`e while
`*int i = 1, fact = 1, n = 10;

`*while (i < n) {
  fact *= i;
  ++i;
}
`e for
`*int fact;
`*for (i; 1 .. 11) { `c[half-open]
  fact *= i;
}
`e break
`e break-out-of-nested-loops
`e continue
`e goto
`e base-exception
`e predefined-exceptions
`e handle-exception
`e define-exception
`e re-raise-exception
`e catch-all-handler
`e multiple-handlers
`e uncaught-exception-behavior
`e error-message
`e system-call-errno
`e finally
`e exception-specification
`e start-thread
`e terminate-current-thread
`e terminate-other-thread
`e list-threads
`e wait-on-thread
`e lock
`e create-message-queue
`e send-message
`e receive-message
`e standard-file-handles
stdin
stderr
stdout
`e read-line-from-stdin
`*string line = readln();
`e write-line-to-stdout
writeln("Hello, world!");
`e printf
writef("count: `%[%d\n]", `=7);
writefln("count: %d", `=7);
`e read-from-file
`e write-to-file
`e file-exists-test-regular-test
`e file-size
`e is-file-readable-writable-executable
`e set-file-permissions
`e copy-file-remove-file-rename-file
`e csv
`e json
`e build-xml
`e parse-xml
`e parse-html
`e build-pathname
`e dirname-and-basename
`e absolute-pathname
`e iterate-over-directory-by-file
`e glob-paths
`e make-directory
`e recursive-copy
`e remove-empty-directory
`e remove-directory-and-contents
`e directory-test
`e generate-unused-directory-name
`e system-temporary-file-directory
`e signature-of-main
`e first-argument
`e environment-variable
`e iterate-through-environment-variables
`e standard-library-name
`e declare-namespace
`e multiple-namespaces-per-file
`e namespaces-map-to-directories
`e import-namespace
`e import-part-of-namespace
`e import-symbol
`e import-static-symbol
`e import-position
`e using-a-symbol-that-hasn-t-been-imported
`e application-environment
`e multiple-installations
`e package-manager
`e type-synonym
`*alias customer_id = `*int;
customer_id cid = `=3;
`e enum
`*enum DayOfWeek { Mon, Tue, Wed, Thu, Fri, Sat, Sun}
DayOfWeek d = Tue;
`e struct-definition
`*class MedalCount {
  `*string country;
  `*int gold;
  `*int silver;
  `*int bronze;
}
`e struct-declaration
MedalCount spain;
`e struct-initialization
MedalCount spain = MedalCount("Spain", 3, 7, 4);
`e struct-member-assignment
spain.country = "Spain";
spain.gold = 3;
spain.silver = 7;
spain.bronze = 4;
`e struct-member-access
`*int spain_total = spain.gold + spain.silver + spain.bronze;
`e define-generic-type
`e instantiate-generic-type
`e generic-function
`e generic-array
`e value-parameter
`e template-parameter
`e template-specialization
`e multiple-type-parameters
`e generic-type-parameters
`e template-parameters
`e variadic-template
`e semantics-of
value comparison
`e define-class
`e class-definition-location
`e constructor
`e create-object
`e destructor
`e destroy-object
`e define-method
`e invoke-method
`e define-class-method
`e invoke-class-method
`e name-of-receiver
`e access-control
`e anonymous-class
`e dynamic-dispatch
`e static-dispatch
`e subclass
`e invoking-superclass-constructor
`e mark-class-underivable-or-method-unoverrideable
`e root-class
`e root-class-methods
`e get-type-class-of-object
`e get-type-class-from-string
`e get-type-class-from-type-identifier
`e class-name
`e get-methods
`e has-method
`e invoke-method-object
`e get-local-hostname-dns-lookup-reverse-dns-lookup
`e http-get
`e http-post
`e absolute-url
`e parse-url
`e url-encode-decode
`e base64-encode-decode
`e test-class
`e run-all-tests
`e equality-assertion
`e approximate-assertion
`e exception-assertion
`e setup
`e teardown
`e stronger-warnings
`e suppress-warnings
`e treat-warnings-as-errors
`e run-debugger
`e debugger-commands-help-list-source-re-load-executable-next-step-set-breakpoint-show-breakpoints-delete-breakpoint-continue-backtrace-up-stack-down-stack-print-run-quit
`e benchmark-code
`e profile-code
`e memory-tool

{'fraction_non_alphanumeric': 0.19642443431925244, 'fraction_numerical': 0.02050351378484825, 'mean_word_length': 4.2512165450121655, 'pattern_counts': {'":': 2, '<': 37, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 2, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2776814', 'n_tokens_mistral': 11386, 'n_tokens_neox': 10932, 'n_words': 2909}