# Exercism -> (Rust, Sublist) **Published by:** [Solomon](https://paragraph.com/@solomon-4/) **Published on:** 2022-07-04 **URL:** https://paragraph.com/@solomon-4/exercism-rust-sublist ## Content I will try to explain you how I am taking my time to get comfortable with rust. Before, I thought copy-paste was the way to go. Right now, i am thoroughly spending time to understand how the language works. I will try to make it a series of solutions/explanations of exercises on exercism. Hope this will help someone! In short, the answer: click to see the code Here are some things I learned (dyor): PartialEq -> Trait Trait -> Collection of Methods (can access other methods in the trait + of the object that the trait is applied Traits methods can also be overriden sublist means a function that accept a generic type with the boundaries of the PartialEq. what is a generic type? ->struct apple {}; struct fruit(apple);here, fruit is a concrete type, apple is not generic, so the apple struct should be passed only. Another example:struct apple {}; struct fruit(apple); here, anything can be passed, because fruit struct is of the generic type. rust allows to define functions inside functions. array2.windows( length ) divides an array into chunks ( mini arrays ) that are of the size length. Every possible sublist is created from array. Then all of the sublists are compared with .any(|x| x == array1). here we are simply comparing if the arrays are identical. That’s it for this time, if u have any questions please let me know! ## Publication Information - [Solomon](https://paragraph.com/@solomon-4/): Publication homepage - [All Posts](https://paragraph.com/@solomon-4/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@solomon-4): Subscribe to updates