nwillc
04/20/2020, 4:48 AMMichael de Kaste
04/20/2020, 7:18 AMtseisel
04/20/2020, 7:36 AM(Foo) -> Bar
are in fact compiled to an actual interface: Function1<Foo, Bar>
(for functions with one parameter). There are a lot of equivalent interfaces matching the number of parameters: Function0
, Function2
...
Because those are all interfaces, then yes, a class can implement them!
That's useful when you need to pass a lambda to a function and maintain some state.David Eriksson
04/20/2020, 12:47 PMstreetsofboston
04/20/2020, 12:57 PM