• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Range of values

 
Gayathri kopparapu
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How can i convert the output of "(range 0 10)" to #{"0" "1" "2" "3" "4" "5" "6" "7" "8" "9"}
 
Sean Corfield
Ranch Hand
Pie
Posts: 298
10
Clojure Linux Mac OS X
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think about the steps involved: (range 0 10) - which is the same as (range 10) by the way - produces a sequence of numbers; you want to convert each number in the sequence to a string; then you want to convert that result sequence into a set.

Sounds like map and set.

Do you know how to convert a number to a string?

I'm not just giving you the answer because I think you would benefit from going through the steps and figuring it out - and this is a very simple problem so if you don't understand how to solve this, you will be lost when you encounter harder problems.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic