The following question has been asked on Telegram:
Hi all, I am facing an issue defining lambda that creates operations in new syntax.
The code below creates a lambda with type of (lambda (pair unit (list operation)) (pair unit (list operation)))
instead of the expected (lambda unit (list operation)).
This is true both for the result variable in storage and the exec_lambda entry point.
A standard approach is to allow SmartPy to handle operations with the with_operations=True parameter. When this parameter is set to True, it will always end with two pairs. If, however, you have valid reasons to avoid this, you can manually manage the operations.
You can use the type sp.operation and push the operations to sp.operations.
See Operations | SmartPy