Macro enso_prelude::f [−][src]
macro_rules! f { ([$($name:ident),*] ($($args:tt)*) $($expr:tt)*) => { ... }; ([$($name:ident),*] $($expr:tt)*) => { ... }; (($($args:tt)*) $name:ident . $($toks:tt)*) => { ... }; (($($args:tt)*) { $name:ident . $($toks:tt)* }) => { ... }; ($name:ident . $($toks:tt)*) => { ... }; }
Expand description
Clones all arguments from the first argument list by using CloneRef
and defines lambda with
arguments from the second argument list (if present). For example, the following usage
ⓘ
f! { (a,b)(c) a + b + c }
is equivalent to:
ⓘ
{ let a = a.clone_ref(); let b = b.clone_ref(); move |c| { a + b + c } }