The difference between fun and lambda would be that lambda always creates a new function type and that the return type is always assumed to be the type of the compiled body. (If you want to create multiple lambdas of the same type, you should just call fun and use the result as your lambda.)
The difference between
funandlambdawould be thatlambdaalways creates a new function type and that the return type is always assumed to be the type of the compiled body. (If you want to create multiple lambdas of the same type, you should just callfunand use the result as yourlambda.)