component PrefixFile(prefix, file) -> out {
  filename : std.Constant(data=file)
  file : io.FileReader()
  prep : text.PrefixString(prefix=prefix)

  filename.token > file.filename
  file.out > prep.in
  prep.out > .out
}


component PrefixFileTwice(file, prefix) -> out {
  prefixedFile : PrefixFile(prefix=prefix, file=file)
  prefix : text.PrefixString(prefix=prefix)

  prefixedFile.out > prefix.in
  prefix.out > .out
}


/* Order of arguments is irrelevant */
src:PrefixFileTwice(prefix="--- ", file="data.txt")
snk:io.Print()

src.out>snk.token
