mesopelagique / formula_compose

Chained formula executions

Home Page:https://mesopelagique.github.io/formula_compose/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

language language-top code-size release license

⛓ Formula Composition

Create a new Formula from a list of Formula.

maths

Result of previous Formula computation is used as parameter for the next one. So you can chain multiple operations.

Examples

$result:=formula_compose (Formula($1+1);Formula($1+2)).call(Null;0) // (0 + 1) + 2 = 3

// or using collection
$formulas:=New collection(Formula($1+1);Formula($1+2)) // add one then add 2
$result:=formula_compose ($formulas).call(Null;0) // (0 + 1) + 2 = 3

Assigning to an object

$operation:=New object("compute";formula_compose ($formulas))
$result:=$operation.compute(3) // (3 + 1) + 2 = 5

more in formula_compose

About

Chained formula executions

https://mesopelagique.github.io/formula_compose/

License:MIT License


Languages

Language:4D 97.7%Language:Roff 2.3%