Win a copy of Head First Android this week in the Android forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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: 357
21
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: 357
21
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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic