Compare commits

..

2 Commits

Author SHA1 Message Date
Alexander Heldt
89a6f09a90 wip 2025-11-19 17:59:21 +01:00
Alexander Heldt
7c03656dfe Add ability to listen (tap) the input
By doing something like
```
fn input_output_loop(input_output: Subject(List(String))) -> Nil {
  let output = process.receive_forever(input_output)

  echo output

  input_output_loop(input_output)
}
```
2025-11-19 17:59:21 +01:00

View File

@@ -52,6 +52,12 @@ pub fn new(exit: Subject(Nil)) -> Result(Nil, String) {
read_input(data, inject_input, tap_input)
})
process.spawn(fn() {
let assert Ok(_) = process.register(process.self(), tap_input_name)
input_output_loop(tap_input)
})
Ok(Nil)
}
}