what does mem_fn do?