Using 'sum' function from Data.Foldable