Add #apply2 and #apply3 functions.