I'm often obliged to read the documentation before using cdr and car functions. Is there pitfalls I should be aware of before aliasing those functions in my init file? Like:
(defalias 'head 'car)
(defalias 'tail 'cdr)
I'm often obliged to read the documentation before using cdr and car functions. Is there pitfalls I should be aware of before aliasing those functions in my init file? Like:
(defalias 'head 'car)
(defalias 'tail 'cdr)
I'd suggest that you (require 'cl) and then use first and rest instead. They already exist, and are the standard alternative names.
They also get expanded to the actual car and cdr byte-code at compilation, whereas your custom aliases would not. (Not that you can't make them -- see the definition of cl--defalias -- but I think sticking to the standard aliases is a better idea.)