A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/zainab-ali/pair-tree.el below:

zainab-ali/pair-tree.el: An Emacs Lisp cons cell explorer

A cons cell explorer.

M-x pair-tree is a learning tool for visualizing Emacs Lisp lists. It builds an explorable box‑and‑pointer diagram for cons cells.

If you're baffled by cons and confused by cdaadr you might want to give it a spin.

M-x pair-tree '((2 . (turtle doves)) (3 french hens) 4 (calling . birds) partridge)

You will need Emacs 27.1 and svg support. Needless to say, this won't work on a terminal.

  1. Use the MELPA package repository
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)
  1. Refresh your packages

    M-x package-refresh-contents
    
  2. Install pair-tree

    M-x package-install pair-tree
    

Clone this repository and add pair-tree.el to your load path:

(add-to-list load-path "/path/to/repo/pair-tree.el")

Call M-x pair-tree and type the list you want to visualise.

You can navigate the tree with the arrow keys. The minibuffer shows the most concise accessor for the focused section.

If you're learning about lists, be sure to read the GNU Emacs manual. You may want to check out dash.el, the excellent list library used in this package.

Racket is an excellent programming language to learn in. If you're using it, take a look at the Sdraw cons cell visualizer instead.

If you're keen to dive deeply into box‑and‑pointer diagrams, have a read through Structure and Interpretation of Computer Programs by Ableson and Sussman.

Thanks to the following people for helping pair-tree grow.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4