WIP
yarn ts-node
import { maybe } from 'src/maybe'
// go wild
- Emphasis on developer experience, as actual structures are well-defined
- Heavy leverage of Typescript features; as little magic as possible
- Code organization in a way that emphasizes category theory relationships while maintaining readability
- Usefulness as a learning tool
- Minimal dependencies
- Production-readiness
- Autocurry functions? (If it doesn't make types too difficult to read)
src
├── [type]
│ ├── data.ts
│ ├── functions.ts
│ ├── index.ts
│ └── types.ts
├── typeclass
│ ├── [typeclass].ts
│ ├── index.ts
└── types
├── [type].ts
└── index.ts
With regards to type directories, the dependency graph should look like the following, with no layer importing from a deeper layer:
data.ts
└── types.ts
└── functions.ts
data.ts
: Data constructors. Should be treated as private and not exported fromindex.ts
. Functions for instantiation should exist infunctions.ts
.functions.ts
: Standalone functions and typeclass instances.types.ts
Type constructors.