In ed it is trivial to edit either side of a line such as changing the line,

I use sam and ed

to,

echo "I use sam and ed."

simply with,

g/.*/s//echo "&."/

I am trying to figure out how to do the same in sam