/* BUG: see if you can find the error in this Diderot program, based on: uncaught exception Match [nonexhaustive match failure] raised at common/phase-timer.sml:76.50-76.52 raised at common/phase-timer.sml:76.50-76.52 raised at typechecker/typechecker.sml:950.39 raised at typechecker/util.sml:238.20 The correct error message is [bug008.diderot:25.21-26.68] Error: unable to resolve overloaded operator "'lerp'" argument type is: (real * real * real * real * real * real) because of a misplaced right parenthesis. */ int imgSize = 400; strand LIC (real xx, real yy) { vec2 pos = [xx,yy]; output real out = 0.0; update { out = |pos|; stabilize; } } initially [ LIC(lerp(0.0, 79.0, -0.5, real(xi), real(imgSize)-0.5, lerp(0.0, 79.0, -0.5, real(yi), real(imgSize)-0.5))) | yi in 0..(imgSize-1), xi in 0..(imgSize-1) ];