jayber f9a4ff3b82 feat: added closures exercises in closure directory
Closures as a separate exercises appeared to be missing, so I added some. Have placed them in the watch order after functions, which seemed reasonable.
2022-05-30 21:47:47 +01:00

21 lines
399 B
Rust

// closures1.rs
// Closures are anonymous functions, but they can be assigned to a variable
// so that they can be used later on
// make me compile and pass
// Execute `rustlings hint closures1` for hints!
// I AM NOT DONE
fn main() {}
#[cfg(test)]
mod tests {
use super::*;
# [test]
fn test_closure() {
let closure = ;
assert_eq!("I'm a closure",closure());
}
}