enum with lamda function