Dcoder
رفتن به کانال در Telegram
Software developer
نمایش بیشترکشور مشخص نشده استدسته بندی مشخص نشده است
475
مشترکین
+124 ساعت
+307 روز
+4230 روز
آرشیو پست ها
476
Repost from Mo' tries
Aight aight, there is this lil thing I made that am proud of lowkey.
It's a react router style routing lib for kotlin. Written in pure kotlin so you can use it anywhere.
It uses the builder pattern, you basically add your routes and the final .build() function makes a readonly prefix tree.
The reason we have a prefix tree (or Trie) is because we want a data structure that can look at a route like
/home/apps/me and select from the routes under each one (home, apps and me) the correct one.
Generally, when you see tree data structures in the wild, they usually solve a multiplexing problem (choosing one option out of many).
It's pretty neat, I used TDD for it.