some->
Nested when/let can be converted to some→
;;; Don't (when-let [x1 (f0 x0)] (when-let [x2 (f1 x1)] (when-let [x3 (f2 x2)] (f3 x3)))) ;;; Do (some-> x0 f0 f1 f2 f3)
;;; Don't (let [x (if (nil? x) nil (x f0)) x (if (nil? x) nil (x f1)) x (if (nil? x) nil (x f2))] (if (nil? x) nil (f3 x))) ;;; Do (some-> x0 f0 f1 f2 f3)
관련 문서
Plugin Backlinks: 아무 것도 없습니다.