find all the higher-order functions and use them, often
Factor is full of higher-order functions that take [ quotations ] or other-words and work on sequences / other data.
For example, to take an IP address as a string and sum its fields, you could do:
"." split [ 10 >base ] [ + ] map-reduce 10 base>
"." split [ 10 >base ] map 0 + reduce 10 base>
"." split [ 10 >base ] map sum 10 base>
Notice that fancy map-reduce is actually longest here because of [ quotation ] syntax, but there's already a sum word for that anyways, which is far shorter.
Here's a place map-reduce is shorter:
[ "." split [ 10 base> ] [ [ 256 * ] dip + ] map-reduce ] bi@ - abs 1 + ]
[ "." split [ 10 base> ] map 0 [ [ 256 * ] dip + ] reduce ] bi@ - abs 1 + ]
Can't use sum there.