Skip to content

Instantly share code, notes, and snippets.

@scottfrazer
Created April 27, 2016 13:37
Show Gist options
  • Save scottfrazer/f4e05c1e66acb31cfcbbc1b0999bc54d to your computer and use it in GitHub Desktop.
Save scottfrazer/f4e05c1e66acb31cfcbbc1b0999bc54d to your computer and use it in GitHub Desktop.
task append_array {
Array[Int] input_array
Array[Int] elements_to_add
command {
python <<CODE
for x in [${sep="," input_array}]:
print(x)
for x in [${sep="," elements_to_add}]:
print(x)
CODE
}
output {
Array[Int] new_array = read_lines(stdout())
}
}
workflow w {
call append_array { input:
input_array=[0,1,2],
elements_to_add=[3,4,5]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment