Problem: No easy way to check if lambda and closure are supported.
Solution: Add the +lambda feature.
#ifdef FEAT_KEYMAP
"keymap",
#endif
+ "lambda", /* always with FEAT_EVAL, since 7.4.2120 with closure */
#ifdef FEAT_LANGMAP
"langmap",
#endif
" Test for lambda and closure
+function! Test_lambda_feature()
+ call assert_equal(1, has('lambda'))
+endfunction
+
function! Test_lambda_with_filter()
let s:x = 2
call assert_equal([2, 3], filter([1, 2, 3], {i, v -> v >= s:x}))
#else
"-keymap",
#endif
+#ifdef FEAT_EVAL
+ "+lambda",
+#else
+ "-lambda",
+#endif
#ifdef FEAT_LANGMAP
"+langmap",
#else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2121,
/**/
2120,
/**/