diff --git a/docs/conf.py b/docs/conf.py index 3aa485feb..55e94f620 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 diff --git a/docs/index.rst b/docs/index.rst index c466e6209..4154a454c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 @@ -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 diff --git a/docs/pages/code/gamma.php b/docs/pages/code/gamma.php index cfa686bb2..8aa3203c9 100644 --- a/docs/pages/code/gamma.php +++ b/docs/pages/code/gamma.php @@ -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; }; @@ -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);