Initial commit

This commit is contained in:
2026-04-14 03:44:59 +02:00
commit a6eb642c76
32 changed files with 589 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
[package]
name = "demo"
version = "0.1.0"
edition = "2024"
[dependencies]
+31
View File
@@ -0,0 +1,31 @@
// Declarative macros
// macro_rules! custom_vec {
// ( $( $x:expr ),* ) => {
// {
// let mut temp_vec = Vec::new();
// $(
// temp_vec.push($x);
// )*
// temp_vec
// }
// };
// // ( $( $x:expr ),*; mult = $mult:expr ) => {
// // custom_vec![$( $x * $mult ),*]
// // };
// }
fn main() {
let mut a = Vec::new();
a.push(1);
a.push(2);
a.push(3);
// let a = vec![1, 2, 3];
// let a = custom_vec!(1, 2, 3);
// let a = custom_vec!(1, 2, 3; mult = 2);
println!("{a:?}");
}