{"repo":"lloydmeta/frunk","free":true,"listed":false,"github":"https://github.com/lloydmeta/frunk","clone":"git clone https://github.com/lloydmeta/frunk.git","description":"Funktional generic type-level programming in Rust: HList, Coproduct, Generic, LabelledGeneric, Validated, Monoid and friends.","language":"Rust","stars":1458,"topics":["hlist","rust","generic","labelled-generic","generic-programming","validated","fp","coproduct","lenses","type-level"],"license":"MIT","category":"dev-tools","readme_excerpt":"Frunk frunk frəNGk Functional programming toolbelt in Rust. Might seem funky at first, but you'll like it. Comes from: funktional (German) + Rust → Frunk The general idea is to make things easier by providing FP tools in Rust to allow for stuff like this: For a deep dive, RustDocs are available for: Code on Master Latest published release Table of Contents 1. HList 2. Generic 2.1 LabelledGeneric 2.1.2 Path (Lenses) 3. Coproduct 4. Validated 5. Semigroup 6. Monoid 7. Features 8. Benchmarks 9. Todo 10. Contributing 11. Inspirations 12. Maintainers Examples HList Statically typed heterogeneous lists. First, let's enable hlist : Some basics: HLists have a hlist pat! macro for pattern matching; To traverse or build lists, you can also prepend/or pop elements at the front: You can reverse, map, and fold over them too: You can pluck a type out of an HList using pluck() , which also gives you back the remainder after plucking that type out. This method is checked at compile-time to make sure that the type you ask for can be extracted. Similarly, you can re-shape, or sculpt, an Hlist , there is a sculpt() method, which allows you to re-organise and/or cull the elements by type. Like pluck() , sculpt() gives you back your target with the remainder data in a pair. This method is also checked at compile time to make sure that it won't fail at runtime (the types in your requested target shape must be a subset of the types in the original HList . Generic Generic is a way of representing a ","default_branch":null,"files":null,"tree":[],"storefront":"/r/lloydmeta","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lloydmeta/frunk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}