Questions tagged as 'clojure'

1
answer

Clojure proposal?

I recently heard of this programming language, Clojure, it uses functions only, is not typed, and appears to be very complex, this is an example of a function that receives a parameter and multiplies that parameter by it even. (defn square [x]...
asked by 10.08.2016 / 13:42
1
answer

Why use Rational type?

Why languages like Haskell and Clojure adopt rational as type? Why would I use Rational instead of Float or Double?     
asked by 25.05.2017 / 00:31
1
answer

Variable in Clojure

I would like to have a counter in memory. A variable that at any time I can add or subtract and when I want I access the current value of it. How to do this in Clojure?     
asked by 01.10.2016 / 21:16
1
answer

How to separate each element from a list, with a String, on a line

The problem is simple, I'd like to add an element to a real-time generated list for each given iteration. For example, if list 1 is generated through [x for x in range(10) if x%2==0] , then I want the 'a' character to appear between each e...
asked by 03.06.2018 / 20:32
1
answer

How to create an arrayList in clojure

How to create a ListList in clojure and add elements? (the existing one in java) My problem is this: I need to read a file and add substrings of that file (space-delimited and "\ n" line break) as separate elements in that array. I can rea...
asked by 08.10.2017 / 17:30
1
answer

Dependency is not added to the clojure project

I'm learning Clojure and created a simple spellchecker project. In this project, I would like to use the StringUtils class from Apache Commons, so I added the following lines of code to import it into my project. ; arquivo core.clj -- contém o...
asked by 30.08.2017 / 21:54
1
answer

Convert JSON to map [closed]

I'm getting a json in the key :body of the response using a request clj-http . How to make this json into map?     
asked by 03.10.2016 / 21:26