JavaBridge: add a test for transforming a function to a Java Lambda-like
instance
add a comment about side effects
add doc comment and type hint in the grammar
Avoid premature creation of Function inside the Rewriter