Skip to content

Commit

Permalink
bit o'README
Browse files Browse the repository at this point in the history
  • Loading branch information
mccraigmccraig committed Dec 18, 2023
1 parent 77cd844 commit 0e2b855
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,25 @@

## ⭐ Getting started

`object-chains` helps you create data-driven programs to process messages or
events. A program to process a single type of value is built from a chain
of effectful or pure steps, and programs can be composed (although cannot directly recurse) . It leans heavily on the awesome power of
[Effect](https://github.com/Effect-TS/effect)
`object-chains` creates data-driven programs to process messages or
events.

```ts
An `ObjectChain` is a program to process a single type of value, and is built from a chain of steps, into which an input object is fed. The output of each step contributes a new key/value to the object, which then constitutes the input to the next step, or the result.

```
Each step in an `ObjectChain` has is either pure (with a pure function `(arg: A) => V`) or effectful (with an `FxFn` - `(d: D) => Effect.Effect<R, E, V>`). The input type of each step in a chain is constrained by outputs of the prior steps and the output type constrains the input of the succeeding step.

`ObjectChains` can be combined into a `MultiChain`, which can then be invoked as an `FxFn`.

`ObjectChains` in a `MultiChain` can invoke other `ObjectChains` in the same `MultiChain`, but direct recursion is not possible.

### upcoming

* step execution control - implement uniform tracing, logging and error-handling using the `ObjectStepSep` data-structures

###

`object-chains` is built with [Effect](https://github.com/Effect-TS/effect) and began as a TypeScript port of [a-frame](https://github.com/yapsterapp/a-frame)

## 📄 License

MIT © mccraigmccraig of the clan mccraig
MIT © mccraigmccraig of the clan mccraig

0 comments on commit 0e2b855

Please sign in to comment.