From 8258947c0235e59326f2fe4ff0412dd8db79700e Mon Sep 17 00:00:00 2001 From: Yin Zhong Date: Tue, 23 Aug 2022 17:25:50 -0700 Subject: [PATCH 1/2] add `std::iter::successors` next to `itertools::iterate` --- src/itercheat/itercheat.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/itercheat/itercheat.html b/src/itercheat/itercheat.html index 4b2627f..c852625 100644 --- a/src/itercheat/itercheat.html +++ b/src/itercheat/itercheat.html @@ -156,6 +156,21 @@

Generators

\(\{\}\) + + Std + successors + \(x : \text{Some}(T) ~|~ \text{None}\) + \(f : \text{&}T \rightarrow \text{Some}(T) ~|~ \text{None}\) + \( + \{c_0, \ldots, c_{l-1}\} \text{ wh.} \\~~ + \text{Some}(c_0) = x, \\~~ + \text{Some}(c_1) = f(\text{&mut } c_0), \\~~ + \ldots, \\~~ + \text{Some}(c_{l-1}) = f(\text{&mut } c_{l-2}), \\~~ + \text{None} = f(\text{&mut } c_{l-1}) + \) + + IT iterate From 5b897fd5be4bd9b6cf6bbf434b7ba0dc1b509e80 Mon Sep 17 00:00:00 2001 From: Yin Zhong Date: Tue, 23 Aug 2022 17:31:31 -0700 Subject: [PATCH 2/2] (not mut) --- src/itercheat/itercheat.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/itercheat/itercheat.html b/src/itercheat/itercheat.html index c852625..0cd1500 100644 --- a/src/itercheat/itercheat.html +++ b/src/itercheat/itercheat.html @@ -164,10 +164,10 @@

Generators

\( \{c_0, \ldots, c_{l-1}\} \text{ wh.} \\~~ \text{Some}(c_0) = x, \\~~ - \text{Some}(c_1) = f(\text{&mut } c_0), \\~~ + \text{Some}(c_1) = f(\text{&}c_0), \\~~ \ldots, \\~~ - \text{Some}(c_{l-1}) = f(\text{&mut } c_{l-2}), \\~~ - \text{None} = f(\text{&mut } c_{l-1}) + \text{Some}(c_{l-1}) = f(\text{&}c_{l-2}), \\~~ + \text{None} = f(\text{&}c_{l-1}) \)