Every function visible at the Scheme level should aggressively check the types of its arguments, to avoid misinterpreting a value, and perhaps causing a segmentation fault. Guile provides some macros to make this easier.
If test is zero, signal a “wrong type argument” error, attributed to the subroutine named subr, operating on the value obj, which is the position'th argument of subr.
One of the above values can be used for position to indicate the number of the argument of subr which is being checked. Alternatively, a positive integer number can be used, which allows to check arguments after the seventh. However, for parameter numbers up to seven it is preferable to use
SCM_ARGNinstead of the corresponding raw number, since it will make the code easier to understand.