• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

using juxt to run multiple functions.

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys :

I have a clojure script, the purpose is to do a whole bunch of "stats" on a JSON, just for experimenting with the
flexibility of text analysis stats in Clojure.



I also tried adding "apply" before juxt and that failed.


 
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
Your opening paren is in the wrong place - remember paren comes before the function, not after it:

You need partial here or an explicit function since you're taking away the last argument (data). It might be cleaner to define each function upfront:

Also note that your parenthesis style is not idiomatic - you're laying out your parens like braces in Java (which is why I think you end up putting them in the wrong place). Try to get used to the more idiomatic layout I'm using where you use small indentation and stack trailing parens on the same line.
 
Ruth Stout was famous for gardening naked. Just like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic