Looks like you're returning the function rather than the result of applying the function here.