Skip to main content

All Questions

Tagged with
50 votes
1 answer
2k views

Connect Four AI (Minimax) in Clojure

I wrote a Connect Four game including a AI in Clojure and since I'm rather new to Clojure, some review would be highly appreciated. It can include everything, coding style, simplifications, etc. But ...
naeg's user avatar
  • 641
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
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
6 votes
2 answers
154 views

Performing an algebraic regression on syntax trees

I am quite new to Clojure and would need some advice on the following genetic programming gist I wrote as my first working clj program. The aim of it is to perform an algebraic regression using ...
vojta havlíček's user avatar
6 votes
1 answer
151 views

Clojure "Game of Life"

I'm a Clojure beginner and I implemented Game of life to learn how I should code things in Clojure. ...
minebreaker's user avatar
6 votes
1 answer
387 views

2048 game implementation in Clojure

This is my first Clojure program. If you want to run it locally please check out https://github.com/achikin/game2048-clj core.clj ...
Anton Chikin's user avatar
5 votes
2 answers
220 views

Implementing parser combinators in a functional manner

I am just starting on my journey of learning clojure (I have just read to the end of chapter 3 in clojure for the brave and true). So for practice, I wrote some parser combinator functions. I am quite ...
user1762507's user avatar
5 votes
1 answer
282 views

Hangman - my first Clojure code

This is my first attempt at Clojure! Apart from all game related issues, how is my code? Is there anything I can do to make it more idiomatic? ...
l3dx's user avatar
  • 153
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
5 votes
1 answer
561 views

Algorithm to Iterate All Possible Strings in Clojure

I'm fairly new to Clojure and I struggled a bit coming up with a nice Clojure-y solution for implementing an algorithm for one of my applications. The real issue I'm trying to solve would require a ...
reibitto's user avatar
5 votes
1 answer
261 views

Hackerrank: Breaking the records

I'm learning Clojure and am a rank n00b at it, trying to learn from books and online tutorials (but I'm sometimes concerned that I am picking up bad habits or at least not all the good habits). For ...
frIT's user avatar
  • 153
4 votes
1 answer
1k views

Clojure Fibonacci

I'm a Clojure novice working through 4Clojure problems. In one problem I am supposed to create a function that takes a number and returns that number of Fibonaccis. My first thought was to create a ...
Thomas Sobieck's user avatar
4 votes
1 answer
491 views

A crude clojure progress reporting function

The purpose of this function is to report processing progress to the terminal. It loops through an array of maps that contain two properties: :sequence and ...
Frank Henard's user avatar
4 votes
3 answers
313 views

Parsing US address with Clojure

The parser below is not designed for every single US address. I am parsing through a file where each line may or may not be an address. I am more focused on speed rather than robustness. ...
pgreen2's user avatar
  • 639
4 votes
1 answer
355 views

Calculating Pi in Clojure

Obviously there are better ways of obtaining Pi, but for educational purposes, how is the code below? ...
user16973's user avatar
  • 181

15 30 50 per page