Created
May 26, 2019 05:21
-
-
Save Haniyya/b2ff3f82b1519f67d2c7a72b102801b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Consumes value, returns nothing (cannot be assigned) | |
fn eat_it(c: Cake) {} | |
// Consumes value, returns another **different** value | |
fn recycle(c: Cake) -> Cake {} | |
// Reads value. Nothing more. | |
fn look_at(c: &Cake) {} | |
// Changes the cake we pass into it. | |
fn decorate(c: &mut Cake) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment