universal ~master
universal properties with applications
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Universal Constructions for D
This module defines universal products (Tuple) and coproducts (Union), with related utility functions and data structures.
Tuples are straight from Phobos, but std.functional.adjoin is reimplemented to support named fields.
Union is a custom implementation, and radically different from Phobos' Algebraic. It is equally simple to use and has greater expressive power than Algebraic (which I attempt to justify in the comments of the same module).
Some extras are built on top of them, like error handling contexts, enum switches, and nullable types.
Use examples are included as documented unittests in almost all modules.
core.coproduct and core.apply are probably the best places to start. Everything else is fairly straightforward, except for core.match, which performs type-level pattern matching in a variety of ways.
- Registered by Vlad Levenfeld
- ~master released 4 years ago
- evenex/universal
- MIT
- Copyright © 2016, Vlad Levenfeld
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.1 2020-Aug-30 0.1.0 2016-Mar-27 ~master 2020-Aug-30 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
191 downloads total
-
- Score:
- 1.1
- Short URL:
- universal.dub.pm