Skip to main content

All 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 ...
rolfl's user avatar
  • 97.7k
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: ...
Landei's user avatar
  • 7,002
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 ...
user avatar
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 ...
Matthias Braun's user avatar
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 ...
Bassem Reda Zohdy's user avatar
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. ...
user avatar
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 ...
Bassem Reda Zohdy's user avatar

close