• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Clojure Function and Map

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to seek some help with Clojure. A function in my program outputs maps (Example: {:a 26, :b 56, c:65...}) on the console. I do not want to save the output in a file. I would rather like to grab each map at a time (on the fly, directly from the console) and write it to a different file. Moreover, I would like to extract just the maps from the output on the console (just in case it has other types). Any help with the code will be appreciated.
 
Rancher
Posts: 379
22
Mac OS X Monad Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're going to need to provide a lot more concrete detail for us to be able to help you.

Normally you wouldn't print results directly, you would have a function that produces the data, and another function that takes that data and prints it.

Can you show us your code? Preferably by pasting it to http://refheap.com and posting the link here.
 
Passy Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sean,

Thank you for your quick response. I really appreciate your willingness to help. I am working with Riemann - an event stream processor. I just want to know a way or a function to access the data from the console. The data type is map and this data on console is the output of my function, say "getEvent". Not sure, if this would help at all?

 
Sean Corfield
Rancher
Posts: 379
22
Mac OS X Monad Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Code. Show us your code.
 
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic