Skip to content

Commit

Permalink
docs: Update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Sep 24, 2022
1 parent 3f90ed6 commit a783394
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,16 @@ def setup(app):

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
'papersize': 'a4paper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',

# Latex figure (float) alignment
#'figure_align': 'htbp',
'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ Features
print_r(iterator_to_array($pipe(new ArrayIterator($data)))); // ['baz', 'bar']
More information about this in the `Brian Lonsdorf's conference`_,
even if this is for Javascript,
More information about this in the `Brian Lonsdorf's conference`_,
even if this is for Javascript,
those concepts are common to other programming languages.

In a nutshell, the combination of currying and function-first enables
Expand All @@ -100,7 +100,7 @@ Features
makes it easy to compose functions to create new functions. Because
the API is *function-first*, *data-last*, you can continue composing
and composing until you build up the function you need before
dropping in the data. See `this Hugh Jackson article`_ describing
dropping in the data. See `this Hugh Jackson article`_ describing
the advantages of this style.

In the following example, the well-known `flatMap`_ could
Expand Down
12 changes: 6 additions & 6 deletions docs/pages/code/gamma.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
}
};

$ = $listInt(1, static function (int $n): int {
$N = $listInt(1, static function (int $n): int {
return $n + 1;
});

$γ = static function (float $n): Closure {
$Y = static function (float $n): Closure {
return static function (int $x) use ($n): float {
return ($x ** ($n - 1)) * (\M_E ** (-$x));
};
};

$ε = static function (float $value): bool {
$e = static function (float $value): bool {
return 10 ** -12 > $value;
};

Expand All @@ -42,9 +42,9 @@
// $number = 6; // 5 * 4 * 3 * 2 => 120
$number = 5.75; // 78.78

$gamma_factorial_approximation = Collection::fromIterable($)
->map($γ($number))
->until($ε)
$gamma_factorial_approximation = Collection::fromIterable($N)
->map($Y($number))
->until($e)
->foldLeft($addition, 0);

print_r($gamma_factorial_approximation);

0 comments on commit a783394

Please sign in to comment.