Not a gender function, adverbial. => necessary to leave, necessary to read, necessary to study. With these types of things, нужно is acting as adverb, no gender agreement. => нужно почитать, нужно смотреть &c.This is what I was told but the infinitive/any form of учить does not have any gender (as far as I am aware)...