introduce curryfication and beta-reduction for terms