2 ms·
Ruby having anonymous functions being defined like { |args| <whatever> } and for no arguments you can drop the || entirely. Rust's |args| { <whatever> } with |
by lamontcg 4y ago
Ruby having anonymous functions being defined like { |args| <whatever> } and for no arguments you can drop the || entirely. Rust's |args| { <whatever> } with || { <whatever> } being mandatory for no args removes the ambiguity in parsing.