import { HKT , Type , URIS } from 'fp-ts/lib/HKT' ; export class Fix < F > { constructor ( public readonly value ) { } } export function fix < F > ( value ) { return new Fix ( value ) ; } export function unfix < F > ( term ) { return term . value ; } export class Cofree < F , A > { constructor ( readonly attribute , readonly hole ) { } } export const cofree = < F , A > ( a , h ) => new Cofree ( a , h ) ; export const attribute = < F , A > ( c ) : A => c . attribute ; export function hole < F extends URIS , A > ( c ) ; export function hole < F , A > ( c ) { return c . hole ; } export type Algebra < F , A > = ( fa : HKT < F , A > ) => A ; export type CVAlgebra < F , A > = ( fa : HKT < F , Cofree < F , A > > ) => A ;