functionalj.functions.LongFuncs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functionalj-core Show documentation
Show all versions of functionalj-core Show documentation
The module for FunctionalJ Core.
package functionalj.functions;
public class LongFuncs {
public static long factorial(long value) {
if (value <= 0) {
return 1;
}
long factorial = 1;
for (long i = 1; i <= value; i++) {
factorial *= i;
}
return factorial;
}
// TODO - toBinary
// TODO - toHex
// TODO - toBase
}