Cancel fractions by fizzie

stdin slurp-fid
: m
2 0 do 0 0 2swap >number 1 /string loop 2>r d>s nip
2dup begin ?dup while tuck mod repeat tuck / -rot / 0 .r dup 1- if ." /" 0 .r then cr 2r>
recurse
;
m

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

download

return to the top page