Skip to content

Instantly share code, notes, and snippets.

@wololock
Created March 29, 2019 21:41
Show Gist options
  • Save wololock/665d07c0b097b772368d3e9d59f4bf04 to your computer and use it in GitHub Desktop.
Save wololock/665d07c0b097b772368d3e9d59f4bf04 to your computer and use it in GitHub Desktop.
def listA = ['ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQR']
def listB = [1,2,1,1,1,1]
def pairs = [listA, listB].transpose()
def map = [:]
pairs.each{ map << (it as MapEntry) }
println(map)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment