Simple lambda not working

Hi all

I wrote a simple lambda for my openhab2 which is not working at all:
It should, when called in my rule with


just turn on some of my lights in the house.

import org.eclipse.xtext.xbase.lib.Functions

val Functions.Function0<void> light = [ |
			logInfo("rule","all Lights on at night")


instead it brings when saved

00:11:11.630 [INFO ] [del.core.internal.ModelRepositoryImpl] - Refreshing model 'default.script'
00:11:12.100 [INFO ] [del.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'default.script', using it anyway:
This expression is not allowed in this context, since it doesn't cause any side effects.
The value of the local variable light is not used

what is wrong here? Thank you for your help in advance

Hu, no one here who could help me with this for 7 days?

Your definiton seem to be ok. Have you tried to use it?