You might also have a look at a library called vinyasa
> https://github.com/ardumont/vinyasa
>
You can can add it to your lein profile to copy functions into clojure.core
and prefix them.
The prefix makes it very clear that these are not part of standard
clojure.core.
(inject 'clojure.cor
On 25 February 2018 at 23:42, Gary Fredericks
wrote:
> For clojure (not cljs, yet) I proxy all the dev utilities I might want to
> use in a namespace called `.` so I can refer to it everywhere no matter
> what the local namespace setup is: https://github.com/
> gfredericks/dot-slash-2
>
Note tha
For clojure (not cljs, yet) I proxy all the dev utilities I might want to
use in a namespace called `.` so I can refer to it everywhere no matter
what the local namespace setup is:
https://github.com/gfredericks/dot-slash-2
On Sunday, February 25, 2018 at 11:45:41 AM UTC-6, Philos Kim wrote:
>
I have another question. Debux library supports ClojureScript as well.
Similarly, I want to add my own function or macro to cljs.core as in Clojure.
Can I use the same strategy in ClojureScript as in Clojure if I use it in the
ClojureScript source code, not in REPL?
--
You received this messa
On 25 February 2018 at 12:01, Philos Kim wrote:
> I know it is not desirable but it is sometimes needed, especially in my
> case.
>
> For example , I wrote debux ( https://github.com/philoskim/debux )
> library. I want to use it only in development, not in production. If I
> 'require' debux in s
Hello Philos,
> For example , I wrote debux ( https://github.com/philoskim/debux )
> library. I want to use it only in development, not in production. If I
> 'require' debux in source code to use it in development, I have to
> remove it in the source code manually in production.
Do you intend
Thanks both of you!
I know it is not desirable but it is sometimes needed, especially in my case.
For example , I wrote debux ( https://github.com/philoskim/debux )
library. I want to use it only in development, not in production. If I
'require' debux in source code to use it in development, I
I would echo the question "is it truly a good idea?"
You can do it, but typing a single :require clause in an ns form once, and
then copying and pasting to other places that you use functions defined in
that namespace, is likely to be less time-consuming in the long run.
Andy
On Sat, Feb 24, 201
Hello Philos,
It's no different to adding a function to any other namespace:
% clj
Clojure 1.9.0
user=> (ns clojure.core)
nil
clojure.core=> (defn foobar [x] (str "foobar " x))
#'clojure.core/foobar
clojure.core=> (ns user)
nil
user=> (foobar "12")
"foobar 12"
user=> foobar
#object[clojure.core$f
Is there any way to add my own function to clojure.core namespace? Because I
want to use that function globally without 'require' or 'use'.
Thanks in advance.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloj
10 matches
Mail list logo