No. 233 · August 16, 2026 · Moderate
StartsWith
Implement `StartsWith<S, P>` so it reports whether the string `S` begins with the prefix `P`. Beginning with, not merely containing.
01
Puzzle
Par 3Puzzle
starts-with.tsStroke 1 of 3Not run yet
Replace ??? — your solution is checked against the cases below. Tab indents; press Escape then Tab to move focus out.
Checks
4StartsWith<'hello world', 'hello'>—→ trueStartsWith<'hello world', 'world'>—→ falseStartsWith<'abc', ''>—→ trueStartsWith<'', 'a'>—→ false
How a check is judged Exact type equality, not assignability — an intersection is not the same as the flattened object.
How everyone did
Fewer than 5 people have solved this one so far. The distribution appears once there is enough of a sample to mean anything.
02
Annotated solution
This write-up publishes 24 hours after the puzzle closes.