How Do I Recover Formatted Mac hfs+ Partition?
The easiest way (depending on your model) is to do an Internet Recovery. You can do this by holding Command+Option+R while your computer boots. You will get a globe and will either ask you to connect to Wifi or if you are connected to ethernet you will just see a progress bar. After it downloads it will bring you to the recovery partition and you can re-partition your HDD and such.