The following doesn't work, the string is returned without changes from replace-pairs... any help? BTW, I really hated writing these functions in factor, they don't feel nice. (Had to go back to elisp to finish my task :( ) : replace-string ( string old new -- string ) [ split1-slice ] dip over [ swap 3append ] [ 2drop ] if ; :: replace-pairs ( string from to -- string ) from to [ [ string ] 2dip replace-string :> string ] 2each string ;