1 Aug 2012 01:07
[groovy-user] limiting nested data structure printing in groovysh repl
I decided to try emptying a reader into nested maps, essentially creating a forward linked list. The
approach is a lot like the lisp/clojure Seq. After creating this in groovysh it printed to the terminal in a
gigantic ugly full representation of all levels of the nested map. Just to share the medusa level
aesthetics of it, I've pasted the end of it in below, though I'm sure you've seen the like before. The
Clojure repl has options for limiting the depth and breadth which will print out. Has anyone done
something similar in Groovysh? Just truncating the string to a few hundred characters would suffice,
though it could easily become necessary to avoid building the string in the first place.
groovy:000> csvseq
===> [manually elided]{it=[Ljava.lang.String; <at> 2a1f0279, next={it=[Ljava.lang.String; <at> 59db6b89}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
[20 lines of the same]
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
groovy:000>
--
--
Travis Wellman
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
RSS Feed