3
$\begingroup$

JLink is really great to act on Java objects and access Java static methods.

I'm asking myself if there would be a way to have access to a more recent Java syntax that allows anonymous functions, from Mathematica.

For example from http://developer.couchbase.com/documentation/server/4.0/sdks/java-2.2/java-intro.html :

bucket
    .async()
    .query(ViewQuery.from("beers_and_breweries", "by_name"))
    .flatMap(AsyncViewResult::rows)
    .flatMap(AsyncViewRow::document)
    .filter(doc -> doc.content().getString("type").equals("beer"))
    .subscribe(doc -> System.out.println(doc.content().getString("name")));

doc -> doc.content().getString("type").equals("beer") is an anonymous function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.