At the risk of being redundant, the Clojure version throws an exception:

user=> (call-fn my-fn)

ArityException Wrong number of args (2) passed to: user/my-fn  
clojure.lang.AFn.throwArity (AFn.java:429)

Alan


On Wednesday, November 6, 2019 at 9:55:47 PM UTC-8, Aklscc wrote:
>
> Hello, everyone. I use ClojureScript as following:
>
> (defn call-fn
>  [f]
>  (f 23 34))
>
> (defn my-fn
>  [a]
>  (println a))
>
> (call-fn my-fn)
> ;; => 23
>
> Without any exception throwed. Why does this? Is it a bug?  
>
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojurescript/0c02f6ea-3b20-4356-9320-98594faf7986%40googlegroups.com.

Reply via email to