Simple detection of pure Tul functions. Move isPure() into a separate file.