Add anonymous function snippet