Groovy web console

subscribe to the feed Subscribe
to this
site

itersect-impl-example

Published 1 month ago by Anonymous
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def modules = ['sv_integrator', 'nwint00', 'atmint', 'q', 'srvgate']
def modules2 = ['sv_rest', 'frdmon']

// Можно так:
// relevantModules = ['crout', 'atmint', 'srvgate', 'posint', 'extrout']
// def cross = relevantModules - (relevantModules - modules)})

// А можно и так (-1 переменная):
def cross = ['atmint', 'srvgate', 'posint', 'extrout'].with({it - (it - modules)})

println "cross: ${cross}"