Hi Day,
I guess it is expected and known behaviour that you need a return
there.
I also stumbled in the same problem a while ago.
You can see detailed Enrico’s reply in the post below on why is that the case:
as far as I understood, the issue is that in your expression inside lambda function you already have a return
word. So RDF does not automatically put any returns inside to avoid confusion, so you have to write it manually in the beginning in this case.
I agree a better documentation&example for this case would be nice.
cheers,
Bohdan