feat: new engine format
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
// Package engine defines a general process of reducing a lambda calculus
|
||||
// expression.
|
||||
package engine
|
||||
|
||||
type Engine[T any] interface {
|
||||
Load() Process[T]
|
||||
}
|
||||
|
||||
// A Process handles the reduction of a
|
||||
type Process[T any] interface {
|
||||
Get() (T, error)
|
||||
Set(T) error
|
||||
Step(int) bool
|
||||
}
|
||||
|
||||
// An Engine is an object that handles
|
||||
type Engine[T any] = func(T) (Process[T], error)
|
||||
|
||||
Reference in New Issue
Block a user