All Questions
Tagged with functional-programming clojure
38 questions
1
vote
1
answer
80
views
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 ...
4
votes
1
answer
169
views
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.
...
2
votes
1
answer
91
views
naive bayes sentiment analysis classifier in clojure
attaching my try on implementing simple naive-bayes classifier for sentiment analysis as part of learning clojure and using functional programming on ML algorithms.
I tried to invest more time in ...
5
votes
2
answers
823
views
Parsing infix expressions in Clojure
I'm trying to teach myself Clojure by reading the Brave Clojure book online, and at the end of Chapter 7 there is an exercise to parse a mathematical expression written as a list in infix notation to ...
5
votes
2
answers
307
views
RSS feed viewer in Clojure
This semester a classmate and I visited a course on functional programming in our university. For grading, we've to submit a small project which should be written in Clojure and make use of functional ...
7
votes
1
answer
211
views
Avoid incoming meteors
I'm visiting a functional programming course at my university which has a small project for examination. The language we are using is clojure and the contents of the lecture have mostly been about it'...
5
votes
2
answers
235
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 ...
2
votes
1
answer
221
views
Sorting texts by similarity in Clojure
This is my first attempt with a lisp language. I'd like your review to address the following points, already listed in order of relevance:
Is my code making good use of standard library?
Is my code ...
3
votes
1
answer
289
views
Solving Knight's Travails Problem without using vector for position
I'm trying to implement a solution to the The Odin Project - Project 2: Knight’s Travails in Clojure (Functional Programming) based on the solution posted by benjdelt.
I would like to know your ...
0
votes
3
answers
925
views
Binary search algorithm in Clojure
I'm absolutely new to Clojure (started learning it yesterday). After I went through some tutorials and checked out the basics I implemented the following Binary search algorithm:
...
1
vote
1
answer
116
views
Parsing string into hash-map with 2D coordinates as keys
I had never programmed in a functional programming language before. I think that this function has large nesting. Is there way to rewrite it better? I am most worried about the use of "flatten". Is ...
3
votes
2
answers
176
views
Project Euler #11 - Largest product in a grid
Problem statement
I've tried to solve the following Euler problem in a very straight-forward way, ideally avoiding recursion if possible and writing it in a functional style.
What is the greatest ...
1
vote
1
answer
129
views
Project Euler #6 - Sum square difference
I'd like to get the code below reviewed on all aspects, specifically I wonder if it's common usage to use let like this, as currently more computations are done in ...
4
votes
2
answers
90
views
Project Euler #3
I'd like to have the code below reviewed on all aspects.
Task: Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143 ?
My ...
3
votes
1
answer
181
views
Project Euler #1 - Revisited
I'm learning Clojure and solved Project Euler #1, I'd like to have my code reviewed on all aspects. I'm marking this as follow-up of Project Euler #1 because I answered my own question and implemented ...