3 added 36 characters in body
source | link

Java 8, 11 bytes

a->b->a%b<1
a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}
import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}

Java 8, 11 bytes

a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}

Java 8, 11 bytes

a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}
2 Edited Language Specs
source | link

Java 8, 11 bytes

a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}

Java, 11 bytes

a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}

Java 8, 11 bytes

a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}
1
source | link

Java, 11 bytes

a->b->a%b<1

What the heck, there are JS and C# versions of this, why not a Java version, too?

Usage:

import java.util.function.Function;

public class Program {
    public static void main(String[] args) {
        System.out.printf("%d, %d %b%n", 9, 3, divides(9, 3, a->b->a%b<1));
        System.out.printf("%d, %d %b%n", 3, 9, divides(3, 9, a->b->a%b<1));
    }

    public static boolean divides(int a, int b,
            Function<Integer, Function<Integer, Boolean>> f) {
        return f.apply(a).apply(b);
    }
}