import type { Recursive } from "@tsplus/stdlib/prelude/Recursive" /** * @tsplus type Recursive/Annotated * @tsplus companion Recursive/Annotated/Ops */ export class Annotated implements Recursive { constructor( readonly caseValue: HKT.Kind>, readonly annotations: A ) {} } export declare namespace Annotated { /** * A function operating on a single level of a recursive structure, * with its recursive terms replaced by a value *and* an annotation, which * represents the value computed for each child. aka `Course-of-Value (CV)Algebra` */ export type Fn = ( r: HKT.Kind> ) => Z } /** * @tsplus fluent Recursive/Annotated unfix * @tsplus static Recursive/Annotated/Ops unfix */ export function unfixAnnotated({ caseValue }: Annotated): HKT.Kind> { return caseValue } /** * @tsplus static Recursive/Annotated/Ops __call * @tsplus static Recursive/Annotated/Ops make */ export function makeAnnotated( caseValue: HKT.Kind>, annotations: Z ): Annotated { return new Annotated(caseValue, annotations) }