A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-create-fn-from-example below:

cljr create fn from example · clojure-emacs/clj-refactor.el Wiki · GitHub

fe Create function from example

When you have a function in mind that you eventually want to create you can just type out its signature as it is used, for example:

(defn my-lovely-fn [some-param]
  (let [foo (util-fn some-param)]
    (other-fn some-param foo)))

Then invoking create function stub from example fe will create the appropriate stub for you:

(defn other-fn [some-param foo]
  )

(defn my-lovely-fn [some-param]
  (let [foo (util-fn some-param)]
    (other-fn some-param foo)))

In case your params for the new function are not symbols the feature will replace them with a generated param name:

(defn other-fn [some-param arg1]
  )

(defn my-simple-fn [some-param]
  (other-fn some-param (util-fn some-param)))


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4