Comment detail

隣り合う二項の差 (Nested Flatten)
1
2
3
4
5
def list = [3, 1, 4, 1, 5, 9, 2, 6, 5]

def result = (1..list.size()-1).collect{ list[it] - list[it-1] }

println result

Index

Feed

Other

Link

Pathtraq

loading...