"the cut has no effect if it is at the beginning of a clause"
This is not true (well, it is here, but accidentally).
The cut means "do not backtrack towards the left of here, instead fail the predicate".
As a consequence, if there are additional clauses coming (lexcially) after the current one, this means "commit to the current clause of the predicate, disregard any further ones".
You can also read it as a "guard-action" separator, performing "first guard wins" logic, where the corresponding guarded action (and only that one) is run on guard success:
head1 :- guard1,!,action1.
head2 :- guard2,!,action2.
head3 :- guard3,!,action3.
head4 :- else_action.
For s/0
, there is effectively an empty guard before !
, so no guard-testing occurs, just commitment to the current clause. But there is only one clause for s/0
, so committing does nothing.