首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 美味的功能善

美味的功能善

  • 资源大小:80.37 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 功能 美味

资 源 简 介

With jcurry, methods can become curried functions. You mark a method with the annotation @AsFunction, and then you can use it in any collections method that takes a function*: ``` @AsFunction private static int increment(int x) { return ++x; } @Test public void testTransformList() { assertEquals(asList(2, 3), transform(asList(1, 2), increment)); } You can also partially apply any method with more than one parameter: @AsFunction private static String concat(String prefix, int suffix) { return prefix + suffix; } @Test public void testTransformListWithPartialApplication() { assertEquals(asList("Fred1", "Fred2"), transform(asList(1, 2), concat.apply("Fred"))); } ``` jcurry works with any instance method, static methods

文 件 列 表

jcurry
javadoc
installation.html
jcurry-src.zip
jcurry.jar
jcurry.png
VIP VIP
0.173998s