Author: | erg |
---|---|
Mode: | factor |
Date: | Sun, 13 Dec 2009 05:42:06 |
: unix-factor ( string -- ) dup string>number [ [ ": " append write ] [ factors [ number>string ] map " " join print ] bi* ] [ "factor: `" "' is not a valid positive integer" surround print ] if* ; : run-unix-factor ( -- ) [ readln [ unix-factor t ] [ f ] if* ] loop ; MAIN: run-unix-factor