import { identity , URI as IdURI } from 'fp-ts/lib/Identity' ; import { Console , generateRandom , getUpperStr , Program , Random } from './tagless' ; const programId = { terminate : identity . of , } ; const randomId = { nextInt : ( upper ) => identity . of ( upper ) , } ; const consoleId = { print : ( _message ) => identity . of ( undefined ) , read : identity . of ( '42' ) , } ; console . log ( generateRandom ( { ... programId , ... randomId } ) ( + getUpperStr ( { ... programId , ... consoleId } ) . fold ( ( x ) => x ) ) . toString ( ) ) ;