Function Example

SOURCE CODE

fn main() {

  let value = 5;

  if is_value_seven(value) {
    println!("yes");
  } else {
    println!("no");
  }

}

fn is_value_seven(check_value: i32) -> bool {
  check_value == 7
}

CODE RUNNER