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.

Filter by
Sorted by
Tagged with
4
votes
1answer
444 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 ...
4
votes
1answer
271 views

Lazy look and say sequence

I have been solving a set of online Clojure problems. One of them involves the look and say sequence. ...
2
votes
3answers
180 views

From enumerator to map

I have an mail object that returns its headers as an Enumerator of Header objects, which have two methods, getName and getValue. I need to convert that to a nice Clojure map so I wrote this short ...
6
votes
3answers
365 views

Finding the sum of the digits appearing in the leaves via in-order traversal

The following text is an in-order traversal of a binary tree with 1023 nodes. What is the sum of the digits appearing in the leaves? How can I improve this Clojure code? It looks strange to me to ...
3
votes
2answers
405 views

Searching for repeated characters in a sequence of characters

The following code solves this problem: The 3072 characters below contain a sequence of 5 characters which is repeated. However, there is a twist: one of the sequences has a typo. To be ...
7
votes
3answers
2k views

Partitioning strings into substrings of fixed length

I've got a Clojure function here that's meant to parse a string of form: "DDXXXYYY" where DD is meant to be discarded, and XXX and YYY are string representations of integers. ...
13
votes
3answers
515 views

Reservoir Sampling in Clojure

I am learning clojure and decided to start out by trying to write a solution to a fairly simple algorithm, reservoir sampling. As I stated, I am learning clojure specifically and problem solving in a ...
25
votes
3answers
2k views

Project Euler Problem 2 in Clojure

I am in the process of learning Clojure. I am fairly new to functional programming and would like to know if my code smells or if there are any performance implications with my approach. ...

1
3 4 5 6
7