re-wrote function numLongChains
re-wrote function flip'
re-wrote function sum'
re-wrote function elem'
re-wrote function map'
Added function sqrtSums