A library for hacking and exploring the jvm: Whats New <https://github.com/zcaudate/iroh#019>0.1.9 - .> macro now supports both .accessors and :accessor calls - delegate added for better object support
<https://github.com/zcaudate/iroh#016>0.1.6 Changed syntax: - .$ to .> (threading macro) - .> to .%> (display class hierachy) - Added .% (display class info) - Now .?, .% and .%> works both on classes and instances <https://github.com/zcaudate/iroh#installation>Installation Add to project.clj dependencies: [im.chit/iroh "0.1.9"] For working in the repl or emacs, inject the core functionality into your clojure.core namespace using vinyasa <https://github.com/zcaudate/vinyasa> by adding the following to your ~/.lein/profiles.clj file: {:user {:dependencies [[im.chit/iroh "0.1.8"] [im.chit/vinyasa "0.2.0"]] :injections [(require 'vinyasa.inject) .... (vinyasa.inject/inject 'clojure.core '[[iroh.core delegate >ns >var .> .? .* .% .%>]]) ....]}} ------ delegate - Transparent Bean Delegate does what bean does but it actually allows field access to the underlying object. This way, one can set and get values from the object : (def a "hello")a ;;=> "hello" (def >a (delegate a))>a ;;=> <java.lang.String@99162322 {:hash 99162322, :hash32 0, :value #<char[] [C@202cf33f>}> @>a ;;=> {:hash 99162322, :hash32 0, :value #<char[] [C@202cf33f>}(keys >a) ;;=> (:value :hash :hash32)(>a :hash) ;;=> 99162322(:hash32 >a) ;;=> 0 (>a :value (char-array "world")) ;;=> "world" a ;;=> "world" (But I thought string where immutable!) .> - Threading A shorthand way of accessing private field is done by using .>: (def a "hello")(.> a :value) ;=> #<char[] [C@753f827a>(.> a (:value (char-array "world")))a ;;=> "world" ---- More on the website - https://github.com/zcaudate/iroh -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
