Small decisions. Interesting possibilities.Submit contentSubmit

How it uses Jev

The function sends `{value, targetLength}` as Jev state and asks a typed `choice` question with options `space_0` through `space_10`. JavaScript extracts the chosen count, repeats spaces that many times, and prefixes the value; the code does not independently verify the choice is correct.

What Jev decides

Illustrative Jev decisionExample answers · not a recorded Jev response · Source ↗
Question 1 · padding
YOUR APP
INSTRUCTION

How many spaces are needed before value to reach targetLength?

STATE

The value to pad and its target length.

JEV · CHOICE
  1. space_0
  2. space_1
  3. space_2
  4. space_3
  5. space_4
  6. space_5
  7. space_6
  8. space_7
  9. space_8
  10. space_9
  11. space_10

App workflow

  1. Validate the target length

    Reject values that are not non-negative safe integers before making a request.

  2. Ask Jev for a count

    Send the value and target length with a Choice question whose criteria enumerate 0–10 spaces; retries are disabled.

  3. Convert the selected option

    Parse the numeric suffix from the selected choice, repeat that many spaces, and prepend them to the value.

Why it is interesting

It is a compact example of consuming a categorical Jev answer as a program value. Its 0-to-10 option limit and acknowledged risk of a wrong choice make the boundary of that approach visible.