Daniel Lundin
03/12/2026, 7:00 AMDaniel Lundin
03/12/2026, 7:01 AMworkflow TEST {
take:
n
main:
def i = 0
ch_n_times = n.map { it -> it * i++ }
emit:
ch_n_times
}
workflow {
TEST(channel.of(1, 2, 3))
TEST.out.view { it -> "t: ${it}" }
}
Run:
$ nextflow run <http://test.nf|test.nf>
N E X T F L O W ~ version 25.10.4
Launching `<http://test.nf|test.nf>` [sleepy_hirsch] DSL2 - revision: 0125bc0496
t: 0
t: 2
t: 6
Linting:
$ nextflow lint <http://test.nf|test.nf>
Error <http://test.nf:8:41|test.nf:8:41>: Unexpected input: '}'
ā 8 | ch_n_times = n.map { it -> it * i++ }
ā° | ^
Nextflow linting complete!
ā 1 file had 1 error
``````Arthur
03/12/2026, 7:33 AM