Functional class with methods