rnd = new Random() ; f = { -> [1,2,3].get(rnd.nextInt(3)) } println (f())