Similar but slightly different JavaScript functions
You can use js' bracket notation for this task

alter = (el, seek, method) -&gt; el.find(seek)[method + "Class"]("active")
#use like this:
alter $("#something"), ".child", "add"


However, your situation doesn't really call for DRYness. Your method names make more sense than alter, or whichever name you may choose.