// counter implemented using closure. for the test of assignment expression fn makecounter(){ let x = 0.0 let countup = | |{ let res = x x = x+1.0 res } countup } let myc = makecounter(); fn dsp(){ myc() }