Logo

Programming-Idioms

History of Idiom 3 > diff from v2 to v3

Edit summary for version 3 by :

Version 2

2015-07-31, 18:50:37

Version 3

2015-08-18, 15:45:45

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Code
fn finish(name : &str) { println!("My job here is done. Goodbye {}", name); }
Comments bubble
The actual return type is Unit, typed '()' and can be ommited from function signature.