I am replaced the lambda functions with small inline functions, since the cenpa-nmr computer compiler doesn't support lambdas.