You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@m3tti, I've thought of add defn, but I discarded the idea because defn should be a macro, and RamdaScript doesn't support macros. I prefer to keep things simple. Currently the way to define/export a function in RamdaScript is:
(def someFn (fn [] 'Hello'))
As you can see, a function is just a value. I recommend to break the line just after the parameter list for better readability, example:
(def someFn (fn []
'Hello'))
I will publish a full-featured TodoMVC using RamdaScript, ReactJS, and Flyd soon.
It would be nice if there is a keyword for
(def hello fn [] "Hello")
like in clojure
(defn hello [] "hello")
The text was updated successfully, but these errors were encountered: