toplevel: parse the defn form to named functions