Questions tagged [clojure]
Clojure is a Lisp dialect for the Java Virtual Machine. Its main features include a software transactional memory system for coherent updates to data structures, transparent access to Java libraries, a dynamic REPL development environment, runtime polymorphism, and built-in concurrent programming constructs.
308 questions
2votes
0answers
65views
Advice on decomplecting and decoupling my tic tac toe implementation
I am hoping to find out what you think about my implementation of tic-tac-toe. It is complete and working as expected with many tests, but the logic in the main module where I have the play-game main ...
2votes
0answers
44views
Tic Tac Toe CLI in Clojure
I wrote a command line tic tac toe game in Clojure. I've broken this post into three sections: Feedback Requests, Gameplay, and Code Feedback Requests I'm looking for feedback on: How "idiomatic&...
2votes
1answer
61views
A better way to parse text input in Clojure
I've been trying Advent of Code challenges to learn Clojure. I've successfully completed Day 2, but I feel like my solution is very clumsy, especially the functions for parsing text input. ...
0votes
1answer
45views
Reduce run time in Clojure
I have a task which runs sequentially. If I have hundreds of thousands of tags, it is very time consuming. Can this be modified to run the task in parallel? Works fine upto 100 tags ...
1vote
1answer
54views
Client <> Query <> Subquery Bookkeeping
Context I am making a system, where different clients issue queries A query is resolved by issuing a set of subqueries I have an invalidation-worker, which gets notified when subqueries go stale ...
2votes
1answer
179views
Clean up improperly formatted phone numbers
This is a problem from Exercism here, the goal is to clean up badly formatted phone numbers. The rules are: If the phone number is less than 10 digits assume that it is a bad number If the phone ...
1vote
1answer
127views
Get city weather and notify an endpoint
I'd like some help to improve this cli program. It queries a city's weather and pushes a weather report. It takes two arguments: the city to query and the apikey for OpenWeatherMap. For example ...
1vote
2answers
120views
Temperature Scale Converter in Clojure
Problem statement: Write a program that converts all given temperatures from a given input temperature scale to a given output temperature scale. The temperature scales to be supported are Kelvin, ...
2votes
1answer
90views
A Clojure program to classify files based on their filename
My first ever lines of Clojure and while the script seems to work as expected, I'm sure it's far from idiomatic Clojure. Thank you for any suggestions. ...
1vote
2answers
245views
Clojure Prime Numbers from 1 to 1000
I am a beginner to Clojure and I made a little script that prints out every prime number from 1 to 1000. Let me know if there are any improvements that I can make: ...
3votes
1answer
216views
Game of Life in Clojure
I've implemented a Game of Life in Clojure and would like to understand what I can do better, especially in terms of idiomatic Clojure (without losing readability/maintainability) of the current ...
1vote
2answers
193views
Verify Armstrong Number in Clojure
Background I am doing an exercise in clojure to make a function that can determine if a number is an Armstrong Number or not. The solution I came up with us a bit more complicated than it would be if ...
1vote
1answer
74views
Factorise numbers
I've started learning Clojure a few days ago and I wrote this code that factorises numbers. How do I make it better? Is there any way to avoid doing it with a loop? Is that how I am supposed to code ...
5votes
1answer
274views
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 ...
4votes
1answer
163views
My implementation of Clojure's assoc-in
This is my implementation of Clojure's assoc-in function. I am looking for tips on making it more idiomatic and in general, better. ...