solving problem like nqueen, quicksort, fibonacci in rust type system.
- practice and deep my understanding of rust's type system
- have fun
- explore what rust can do and what rust cannot do in type system
the 3rd is only partly achieved, projects like lisp-in-types did make a solid exploration on the boundary of rust's type system's expressiveness.
- iterate all possible combinations.
- filter the valid ones.
- partition the list at some point.
- sort the partitioned left and right part recursively.
- merge the final results.
- simple recursive function encoding.
- the trait bound looks like a mess, it is indeed unreadable. But thankfully, you don't have to worry about that much, since our compiler are smart enough to tell you how to write the correct one.
- we did not inplemented data structures like map, which could be useful if you want to write more advanced applications like
expression evaluator