Update README.md

This commit is contained in:
Zach Eriksen 2021-03-01 21:55:52 -06:00 committed by GitHub
parent 8a5a1287c7
commit 3f3e0e9514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 50 additions and 0 deletions

View File

@ -1,5 +1,55 @@
# Observation
## What is this
This is a work in progress project to experiment with [Chain](https://github.com/0xLeif/Chain) and [E.num](https://github.com/0xLeif/E.num) in useful ways.
## Dependencies
### [E.num](https://github.com/0xLeif/E.num)
#### [Variable](https://github.com/0xLeif/E.num/blob/main/Sources/E/Variable.swift)
```swift
public enum Variable: Hashable {
case void
case bool(Bool)
case int(Int)
case float(Float)
case double(Double)
case string(String)
case set(Set<Variable>)
case array([Variable])
case dictionary([Variable: Variable])
}
```
#### [Function](https://github.com/0xLeif/E.num/blob/main/Sources/E/Function.swift)
```swift
public enum Function {
case void(() -> ())
case `in`((Variable) -> ())
case out(() -> Variable)
case `inout`((Variable) -> Variable)
}
```
### [Chain](https://github.com/0xLeif/Chain)
```swift
public indirect enum Chain {
case end
case complete(E.Function?)
case link(E.Function, Chain)
case background(E.Function, Chain)
case multi([Chain])
}
```
***
## Example Code