Skip to main content

All Questions

Tagged with
2 votes
3 answers
545 views

Solving quadratic equation in Clojure

I wrote a function in Clojure to solve quadratic equations using the quadratic formula The function ...
Attilio's user avatar
  • 1,645
3 votes
1 answer
839 views

Get RSS feeds and store them into database

It is my first program in Clojure. It read RSS feed's list from text file, get each feed and store result into sqlite database. project.clj: ...
ceth's user avatar
  • 792
5 votes
2 answers
141 views

Resolve double auction orders

Given a vector of seller orders (asks) of a certain product (each order having a price) and buyer orders (bids) of the same product, I'm creating a function that resolves the auction by matching the ...
Ezequiel's user avatar
  • 208
2 votes
1 answer
3k views

Generate all permutations in Clojure

Given a set, generate all permutations: (permutations #{1 4 5}) => ((5 4 1) (4 5 1) (5 1 4) (1 5 4) (4 1 5) (1 4 5)) Here's what I cobbled together: ...
bkoodaa's user avatar
  • 153
4 votes
1 answer
107 views

Building blocks of Life

I'm learning Clojure, and decided to write a Conway's Game of Life clone as my starting project. I ended up dicking around for a bit before diving in, and came up with a few functions that I'd like ...
Carcigenicate's user avatar
2 votes
1 answer
848 views

Clojure counter

I'm learning clojure ref types and was trying to make a robust counter generating function. Is there any error or improvement on the code? is there a simpler way? (I want the function to be thread-...
niicM's user avatar
  • 23
6 votes
2 answers
295 views

Document term matrix in Clojure

This is my very first foray into Clojure (I'm normally a Python-pushing data-type). I'm trying to create a simple term-document matrix as a vector of vectors, out of a vector of strings. For those ...
Paul Gowder's user avatar
2 votes
1 answer
306 views

RLE-like string compression in clojure

There have been already many similar questions to this one (e.g. this and this, just to point two), but I did not find any for clojure. The goal is to compress a string in a RLE-like way: i.e. each ...
Attilio's user avatar
  • 1,645
10 votes
2 answers
815 views

Number factorization in clojure

I'm just a Clojure noob (started learning yesterday). Here is my helloworld program. It factorizes number into primes. Do you have any comments? How could I make this code cleaner and shorter? Maybe I ...
Viacheslav Kovalev's user avatar
1 vote
3 answers
4k views

Sum of digits in Clojure

I wrote a simple program to sum the digits of a number in Clojure for learning purpose. Not very complex (I hope) so not adding any explanation. I am a beginner in Clojure so please don't mind ...
Aseem Bansal's user avatar
  • 2,269
2 votes
2 answers
573 views

PMX crossover implementation in Clojure

I'm starting to learn Clojure and as an exercise I've implemented the following functions (written in Java) in Clojure: ...
ionutt93's user avatar
2 votes
1 answer
396 views

Program for printing all numbers that user inputs till 42 in Clojure

As the name suggests it is a very simple program to print numbers to screen till user inputs 42. ...
Aseem Bansal's user avatar
  • 2,269
4 votes
1 answer
499 views

Number guessing game in Clojure

I have recently started learning Clojure, and decided to write a number-guessing-game as an exercise. The game works as follows: User enters minimum and maximum values Computer generates a number ...
Attilio's user avatar
  • 1,645
1 vote
1 answer
340 views

Read Space Delimited Text File to Standardized Data Type

From the README.md Introduction: The purpose of data-in is to read all the lines from a text file and return the file's contents as a Clojure value in a ...
ben rudgers's user avatar
  • 2,663
2 votes
0 answers
108 views

Re-implementation of Caolan McMahon's parallel and map functions

I have wrote my first reasonably complete piece of ClojureScript code and would like feedback. It is basically a re-implementation of Caolan McMahon's parallel and map functions from async in ...
Forbesmyester's user avatar

15 30 50 per page