pub fn run() {
    greeting("Hello", "Rishabh");

    // Bind function values to variables
    let get_sum = add(5, 5);
    println!("Sum: {}", get_sum);

    // Closure
    let n3: i32 = 10;
    let add_nums = |n1: i32, n2: i32| n1 + n2 + n3;
    println!("Add: {}", add_nums(3, 3));
}
// Functions - Used to stored blocks of code to re-use
Used to stored blocks of code to re-use
Used to stored blocks of code to re - use
pub fn run() {
    greeting("Hello", "Rishabh");
    // Bind function values to variables
    let get_sum = add(5, 5);
    println!("Sum: {}", get_sum);
    // Closure
    let n3: i32 = 10;
    let add_nums = |n1: i32, n2: i32| n1 + n2 + n3;
    println!("Add: {}", add_nums(3, 3));
}
pub fn run ( ) { greeting ( " " , " " ) ; // Bind function values to variables let get_sum = add ( 5 , 5 ) ; println ! ( " " get_sum ) ; // Closure let n3 : i32 = 10 ; let add_nums = | n1 : i32 , n2 : i32 | n1 + n2 + n3 ; println ! ( " " add_nums ( 3 3 ) ) ; }
Functions - Used to stored blocks of code to re-use
Functions - Used to stored blocks of code to re - use