Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>> Everything is a Graph >> Lisp: everything’s a list

Actually, the universal 'cons' cell data type of LISP (which is used to build lists) allows to represent graphs. Take, for example, Common Lisp. There are read-macros which make this possible: The expression #1=(hello . #1#) builds a circular list that only contains the symbol "hello" [1]. This example can be extended to build graphs.

[1]: https://letoverlambda.com/index.cl/guest/chap3.html#sec_5



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: