From b85fe02ea3c80ac3545417ed51e8bb7cc85d6ab4 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 21 Oct 2023 12:25:02 +0200 Subject: [PATCH] make sure Content::ofLines() and ::ofChunks() hold the properties --- proofs/file/content.php | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/proofs/file/content.php b/proofs/file/content.php index 7205f59..f2c350f 100644 --- a/proofs/file/content.php +++ b/proofs/file/content.php @@ -1,12 +1,19 @@ filter(static fn($char) => $char !== "\n"), + ) + ->map(Str::of(...)) + ->map(Line::of(...)), + ) + ->map(static fn($lines) => Model::ofLines(Sequence::of(...$lines))), + ], + [ + 'Content::ofChunks()', + Set\Sequence::of( + Set\Strings::madeOf(Set\Unicode::any())->map(Str::of(...)), + ) + ->map(static fn($chunks) => Model::ofChunks(Sequence::of(...$chunks))), + ], ]; foreach ($implementations as [$name, $content]) {