is as operator add type class anonymous function