4 ms·
Maybe your code isn't famous enough. I've seen lots of x::xs's everywhere, but never a single h::t. Personally, I always use x::xs in one-liners and something
by mich41 14y ago
Maybe your code isn't famous enough. I've seen lots of x::xs's everywhere, but never a single h::t.
Personally, I always use x::xs in one-liners and something meaningful (no, neither head nor h is meaningful) in longer matches.
- flaie 14y agoI've never mentioned my code as being famous. I've always used h and t in one-liners, maybe because of the person who taught me OCaml. H and t can also be found in the official Caml and batteries source code, along with hd/tl, a/l and probably x/xs if it pleases you. I can't agree more about naming variables correctly where it makes sense though.