Habanero
1 program
Added 2026-03-06T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Habanero-Java, HJ, HJlib
Provenance: commit 6ce29c4b3a · authored 2026-03-06T11:58:17+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Parallel Fibonacci
Provenance: commit 6ce29c4b3a · authored 2026-03-06T11:58:17+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
import static edu.rice.hj.Module1.*;
import static edu.rice.hj.Module0.*;
public class Fibonacci {
static int fib(int n) throws SuspendableException {
if (n <= 1) return n;
HjFuture<Integer> f1 = future(() -> fib(n - 1));
int f2 = fib(n - 2);
return f1.get() + f2;
}
public static void main(String[] args) throws SuspendableException {
launchHabaneroApp(() -> {
for (int n = 0; n <= 10; n++) {
final int x = n;
System.out.println("fib(" + x + ") = " + fib(x));
}
});
}
}