add macro to simplify generic lambda