Skip to main content
added 41 characters in body
Source Link

Rust, 4546 bytes

I did not see a rust solution, so here ishere's my attempt:

fn main(){print||print!("{:?}",(0..b'e').collect::<Vec<_>>());}

Try it online!Try it online!

Thanks to @ovs for pointing out the closure variant.

The range (0..b'e') is collected into a vector (using the placeholder _, letting the compiler figure out the type) and printed using the debug formatter {:?}, which "dumps" the entire vector.

The range upper bound is exclusive, and is represented using the byte literal b'e', which is equivalent to an u8 integer number literal; in this case 101 (e's ASCII value).

Rust, 45 bytes

I did not see a rust solution, so here is my attempt:

fn main(){print!("{:?}",(0..b'e').collect::<Vec<_>>());}

Try it online!

The range (0..b'e') is collected into a vector (using the placeholder _, letting the compiler figure out the type) and printed using the debug formatter {:?}, which "dumps" the entire vector.

The range upper bound is exclusive, and is represented using the byte literal b'e', which is equivalent to an u8 integer number literal; in this case 101 (e's ASCII value).

Rust, 46 bytes

I did not see a rust solution, so here's my attempt:

||print!("{:?}",(0..b'e').collect::<Vec<_>>())

Try it online!

Thanks to @ovs for pointing out the closure variant.

The range (0..b'e') is collected into a vector (using the placeholder _, letting the compiler figure out the type) and printed using the debug formatter {:?}, which "dumps" the entire vector.

The range upper bound is exclusive, and is represented using the byte literal b'e', which is equivalent to an u8 integer number literal; in this case 101 (e's ASCII value).

add explanation
Source Link

Rust, 45 bytes

I did not see a rust solution, so here is my attempt:

fn main(){print!("{:?}",(0..b'e').collect::<Vec<_>>());}

Try it online!

The range (0..b'e') is collected into a vector (using the placeholder _, letting the compiler figure out the type) and printed using the debug formatter {:?}, which "dumps" the entire vector.

The range upper bound is exclusive, and is represented using the byte literal b'e', which is equivalent to an u8 integer number literal; in this case 101 (e's ASCII value).

Rust, 45 bytes

I did not see a rust solution, so here is my attempt:

fn main(){print!("{:?}",(0..b'e').collect::<Vec<_>>());}

Try it online!

Rust, 45 bytes

I did not see a rust solution, so here is my attempt:

fn main(){print!("{:?}",(0..b'e').collect::<Vec<_>>());}

Try it online!

The range (0..b'e') is collected into a vector (using the placeholder _, letting the compiler figure out the type) and printed using the debug formatter {:?}, which "dumps" the entire vector.

The range upper bound is exclusive, and is represented using the byte literal b'e', which is equivalent to an u8 integer number literal; in this case 101 (e's ASCII value).

Source Link

Rust, 45 bytes

I did not see a rust solution, so here is my attempt:

fn main(){print!("{:?}",(0..b'e').collect::<Vec<_>>());}

Try it online!