The reaction can go in either direction. Rain containing dissolved carbon dioxide can react with calcium carbonate and carry calcium ions away with it. The calcium carbonate may be re-deposited as calcite as the carbon dioxide is lost to atmosphere, sometimes forming stalactites and stalagmites.