Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mod nuconta_hacks {
- pub trait Hackable {
- fn idea(self) -> String;
- }
- pub struct CoolShit<T> {
- cool: T,
- }
- fn coolify<T>(thing: T) -> CoolShit<T> {
- CoolShit { cool: thing }
- }
- fn hack(hack: impl Hackable) -> String {
- hack.idea()
- }
- fn a_ton<T: Clone>(thing: T) -> Vec<T> {
- std::iter::repeat(thing).take(50).collect::<Vec<T>>()
- }
- fn cool_things(idea: impl Hackable) -> Vec<CoolShit<String>> {
- a_ton(
- hack(idea)
- )
- .into_iter()
- .map(coolify)
- .collect()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement