Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Pretty Print Tree Data Structures in Common Lisp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lispm

This comment has been minimized.

Copy link

@lispm lispm commented Feb 20, 2020

That's nice! Well done!

Btw.:

  • you can get rid of the (APPLY #'NCONC ...) if you APPEND in the LOOPs, instead of COLLECT.

  • it's usually better to put a WITH clause before all the FOR clauses

  • one can also write FOR (head . tail) ON lower-children

@vseloved

This comment has been minimized.

Copy link

@vseloved vseloved commented Feb 20, 2020

@WetHat

This comment has been minimized.

Copy link
Owner Author

@WetHat WetHat commented Feb 20, 2020

@WetHat

This comment has been minimized.

Copy link
Owner Author

@WetHat WetHat commented Feb 20, 2020

Hi lispm,

Your suggestions are very much appreciated! I'll look into them as soon as I can.

  • you can get rid of the (APPLY #'NCONC ...) if you APPEND in the LOOPs, instead of COLLECT.
  • it's usually better to put a WITH clause before all the FOR clauses
  • one can also write FOR (head . tail) ON lower-children
@vseloved

This comment has been minimized.

Copy link

@vseloved vseloved commented Feb 20, 2020

Thanks for the pointer to svgbob. I'm collecting such references. A great list of different ASCII and similar visualization tools is crowdsourced here: https://twitter.com/SusanPotter/status/1189165775275331584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.