ncurry implemented