Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有一种方法可以按降序获得范围?
前任
[1..4]
评估为
> val it : int list = [1; 2; 3; 4]
但
[4..1]
> val it : int list = []
是否有不同的语法来实现这一点而无需执行List.Reverse?
List.Reverse
你所要做的:
[4..-1..1]
-1 是步骤
I have an abstract method as part of an abstract class with the following declaration:
abstract public ArrayList<Device> returnDevices(ArrayList<Object>