function.md > Piping: example code doesn't work as expected
The example code given
fn format_with pat
read input
echo $join(@split(input), $pat)
end
echo one two three four five | format_with "-"
when executed, gives
one two three four five,
I'd expected to see
one-two-three-four-five