closures
tail recursion
repetition
DRY
DRY by closures