```ts
/** The first few entries of a list. */
export function headOf(entries: string[], count: number): string[] {
  if (count < 0) {
    throw new Error("Count must be non-negative");
  }
  return count === 0 ? [] : entries.slice(-count);
}
```