Implements letfn.