Logic · rule
semantic.unused_result
Value is computed and thrown away.
Area 3, Logic; not declinable; the next step is usually the agent's.
A call stands on its own only when its result is Unit, and a function called on its own does nothing:
type Note = Text {}function tidy(note: Note) -> Note { return note}action save(note: Note) -> Unit { tidy(note)}
error: This `Note` is thrown away --> main.jadpo:8:5 |8 | tidy(note) | ^^^^^^^^^^ result not used reason: `tidy` only computes its result, so calling it without using the result does nothing. next: Use the value, or remove it (agent) rule: semantic.unused_result help: https://jadpo.dev/docs/errors/semantic.unused_resultcheck failed: 1 error, 1 file
Markdown for agents: /docs/errors/semantic.unused_result.md.Built from Jadpo main at a707efb.