All Questions
Tagged with functional-programmingjava
7 questions
19votes
1answer
444views
Streaming Collatz
Challenge The recent question The 3n + 1 algorithm for a range inspired me to investigate a Java-8 dependent streaming mechanism for solving the programming challenge: For any two numbers ...
12votes
2answers
725views
N-Queens functional
I'm trying to get a better grip on the new functional possibilities of Java 8. As an example, I took this very elegant Haskell snippet: ...
8votes
2answers
321views
Compiler for a minimal LISP dialect to run on the Java Virtual Machine
As the title states, this is a compiler written in C with a ruby build script that translates a minimal LISP dialect and spits out an executable jar file. I designed this LISP dialect and named it ...
7votes
3answers
282views
Sequencing Collector for Either
Using Java 8, I'd like to sequence my eithers using a Collector: Sequencing a stream of eithers means for me: If there's at least one left either inside the stream, I expect the Collector to return ...
4votes
2answers
210views
ConsumingRouter to consume based on condition
Started as to make a stream splitter to split stream based on condition, but finally found that I did ConsumingRouter, to consume based on condition and while have to provide consumers before using ...
3votes
1answer
104views
Sequentially find the indexes of an element into a collection
Util class to find into a collection the indexes of a given element with multiple occurrences from the first index or relative to a given index. ...
2votes
1answer
3kviews
Routing Java objects using conditional consumers
As per a previous question here and answers I got, I used it to get a new implementation. I found that I have to make two implementations match once "to ignore other consumers after matching once" and ...