Thanks, that implementation is just what i was searching for.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
f
Thanks, that implementation is just what i was searching for.
понедельник, 24 декабря 2012 г., 21:17:11 UTC+4 пользователь juan.facorro
написал:
>
> Here's a possible implementation:
>
> (ns macro-test
> (:require [clojure.pprint :as p]))
>
> (defn get-args-index [x]
> (first (filter identity
You don't need any of the typehints in your reify body. The compiler infers
argument and return types from the interface definition.
On Monday, December 24, 2012 5:35:35 AM UTC-8, nkonovalov wrote:
>
> Hi.
>
> I have a java interface.
> Something like this this.
>
> public interface ITest {
>
Here's a possible implementation:
(ns macro-test
(:require [clojure.pprint :as p]))
(defn get-args-index [x]
(first (filter identity (map-indexed #(when (vector? %2) %1) x
(defn insert-at [x y i]
(concat (take (inc i) x) (list y) (drop (inc i) x)))
(defmacro reify-with-validation [f i