Skip to content

Releases: suk-ws/da4a

v0.1.0

16 Jun 16:23
e698d43
Compare
Choose a tag to compare

This early-stage version may not works on Java platform.

Features added

Add contexts.GivenContext. Which can does some provide/inject like work, passing variables between two non-depended functions, in a type-safe way.

Add math.dsl, provides some math operator and pre-defined values.

  • method x over y and operator x /-/ y for any two numeric value x and y. Like / but always do calc in double.
  • operator x *^ y for any two numeric value x and y. Calcs the math.pow(x, y).
  • method x.asPercentage for any two numeric value x. Power the value x with 100 so that make it from a basic number to a percentage literal. (like 1.asPercentage is 100, 0.55.asPercentage is 55.0, 1.14514.asPercentage is 114.514)

Add data.IEncapsulateValue and data.EncapsulateValue, extensions Any makes a value x: T can be converted to Some, Left or Right etc using suffix method.

Add stacks.withCurrentStack makes it easier to get stack traces.

Add throwable.ThrowableExtensions makes it eaiser to get an exception's full error reporting message as String.

Features that NOT recommended to use (WIP or very unstable)

count.NumericCount, a class moved from Morny Coeur. Not recommended due to a bad design.

random.*, random utils. Not recommended due to WIP.