ISBN2 by kozima

(loop(rplaca(setq x(cddddr(map'list(lambda(c)(min(-(char-int c)48)10))(read-line)))f(nth 11 x)y(member 10 x))0)(do()((=(mod(loop for i from 1 and j in x sum(*(if f(if(oddp i)1 3)(- i))j))(if f 10 11))0)(format t"ISBN~{~A~}
"(subst'x 10 x)))(incf(car y))))

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page