-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I use reducers all the time, and frequently use type parameters in documentation named "reducer", and "foldable". It would probably be a good idea to formally define them.
interface Reducible {
reduce?: ((a?, c?, i: Number, Foldable) => a, initial: Any) => Any
}
interface Foldable = Reducible | Iterable
interface Reducer = (a?, c?, i: Number, Foldable) => aExample
Transducer = Reducer => Reducer
createTransducer = ({
step: Reducer,
init?: Reducer,
result?: Reducer,
next?: Reducer
}) => Reducer => Reducer
transduce = (Reducer, initial: Any, xform: Transducer, Foldable) => AnyMappable
interface Mappable {
map: Functor(a) ~> (a => b) => Functor(b)
}Change IterableObject to Iterable
I know it's a breaking change, but AFAIK, there's not a lot of software relying on this, yet.
Metadata
Metadata
Assignees
Labels
No labels