Using trailing closure syntax for the last parameter in a call is often the most elegant way to handle it. But if the call requires multiple function-type arguments, the use of a trailing closure can be messy and confusing. In such cases, it's better to pass closure expressions as normal arguments.


== Noncompliant Code Example

----
var x = complexOperation(
  arg: 2,
  op1: {$0 + 10}
) {$0 * $0}
----


== Compliant Solution

----
var x = complexOperation(
  arg: 2,
  op1: {$0 + 10},
  op2: {$0 * $0}
)
----



ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
