如何处理约5立方米的木材

问题描述 投票:0回答:1

花园里5立方米的木材如何处理?

python java
1个回答
3
投票

您可以使用

reduce
来组合数组:

WITH path,
     extract(n IN nodes(path)| n.name) as names,
     extract(r IN relationships(path)| r.metric) as metrics
RETURN HEAD(names) + 
       REDUCE(acc = [], i in RANGE(1,size(metrics)) | 
              acc  + metrics[i-1] + names[i])
© www.soinside.com 2019 - 2024. All rights reserved.