Timeline for Subtract ordered lists
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 6 at 16:53 | comment | added | Chris |
Commenting from the future: this can be made tail-recursive with tail_mod_cons . let[@tail_mod_cons] rec subtract_list xs xy = ...
|
|
Dec 3, 2022 at 22:49 | comment | added | Chris |
You can also shadow names. E.g. in x :: xs', _ -> x :: (subtract_list xs' ys) the original binding of xs is never used, so we could safely shadow it: x :: xs, _ -> x :: (subtract_list xs ys)
|
|
May 4, 2017 at 23:47 | comment | added | Mars | Right--OK. Makes sense. | |
May 4, 2017 at 17:03 | comment | added | RichN |
Yes. It looks more "math-y". :) OCaml supports multiple ticks, so you could have x'' . But then it starts to get confusing.
|
|
May 4, 2017 at 3:14 | comment | added | Mars | One can understand your version more quickly. Is that a common idiom--using the tick/quote/prime that way? | |
May 4, 2017 at 2:53 | vote | accept | Mars | ||
May 3, 2017 at 14:43 | history | answered | RichN | CC BY-SA 3.0 |