3 ms·
> looks like the original code returns the lines after the '+++' lines, but I can not tell for sure, as the header/modified function implementations are not giv
by sampo 12y ago
> looks like the original code returns the lines after the '+++' lines, but I can not tell for sure, as the header/modified function implementations are not given
Actually from the line
| [] -> ()
we know that the function `start`returns nothing (well, returns a special value 'unit' which is OCaml's way to say nothing), so also the functions `header` and `modified` inside must return nothing, so they are called for their side effects only.
- dragonwriter 12y ago> we know that the function `start`returns nothing Which is cool, but start is a (recursive) helper function for the go function (and if you look at the source file, there are a number more that are defined along with it, this is kind of a weird excerpt to just show the main go function and the first of several helpers), which is be the main public interface being defined in the code presented. I wasn't trying to describe what it looked like start did when called, but what it seemed like go was trying to do. (And, I was doing so looking just at the excerpt and going a bit off the cuff; its clearly, looking at the source file, doing a lot more.)