This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (list.isEmpty()) | |
return ""; | |
for (Object x : list) | |
sb.append(fn(x)).append(","); | |
return sb.deleteCharAt(sb.length() - 1).toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 0; i < array.length; ++i) { | |
if (i > 0) | |
sb.append(","); | |
sb.append(fn(array[i])); | |
} | |
return sb.toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Params("value, block=false") | |
public static Object EqualRange(Object self, Object a, Object b) { | |
Range r = ((SuContainer) self).equalRange(a, b); | |
return SuContainer.of(r.left, r.right); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EqualRange extends SuMethod2 { | |
{ params = new FunctionSpec(array("value", "block"), Boolean.FALSE); } | |
@Override | |
public Object eval2(Object self, Object a, Object b) { | |
Range r = ((SuContainer) self).equalRange(a, b); | |
return SuContainer.of(r.left, r.right); | |
} | |
} |
NewerOlder