3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Answer architecture round 1: 0 🔴, 7 🟡 (0 misread); test BlockText's measures and the batching against one run per pass, one withinLongest, marker facts beside their readers

This commit is contained in:
2026-10-29 13:55:50 +01:00
committed by Lillem4n
parent 10cb24e706
commit 28ae354315
15 changed files with 201 additions and 85 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ export function tooLong<T>(): Result<T> {
return failure('unsupported-node-shape', `this conversion would build text longer than ${longestOutput} characters, the longest this library writes`, [])
}
export function withinLongest(text: string): Result<string> {
return text.length > longestOutput ? tooLong() : success(text)
export function withinLongest<T>(length: number, value: T): Result<T> {
return length > longestOutput ? tooLong() : success(value)
}
export function joinedWithin(pieces: Iterable<string>): Result<string> {