-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
Function calls where a braced expression is present in the last argument deserves a call out, as it is a special function call style (i.e. not exactly flat or expanded)
map(xs, function(x) {
do_something(x)
})
map(xs, \(x) {
do_something(x)
})
test_that("description", {
test_me
})These make for particularly unique function call layouts, because normally the expansion of the braced expression over multiple lines would force the expansion of every argument in the function call, looking like:
map(
xs,
function(x) {
do_something(x)
}
)
map(
xs,
\(x) {
do_something(x)
}
)
test_that(
"description",
{
test_me
}
)Note that this only applies to trailing braced expressions, for example with tryCatch() we do full expansion of every argument
tryCatch(
{
expr
},
error = function(e) {}
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels