Lisp cyclic lists -


We have been given homework indefinitely where I need to use the "cyclic" list (I do not know if the right What is naming for this) In the "cyclical" list, I mean the list, where the previous code of a previous cdr indicates the first one from the same list.

  (Value1. PointerValue2) (Value2. PointerValue3) (Value3. PointerValue1)   

We have been taught to create such lists in this way:

  (defun cykl (l) (setf (cdr) (last L))   

I LISP software ( lispabax ) Does not support such lists. I also tried clisp on Debian, but after creating such a list it has crashed.

Did you know that it supports (freeware, OS Free)?

All Lisp implementation, which includes support for clisp .

When you say "crash", you probably mean one (or an out-of-memory era), which you should always print ('read-up- Print 'try to remember the loop)?) Is a circular structure when is zero . Setting t forces to use this notation:

  [1] & gt; (DefEfermeter L (list 1 2 3)) L [2] & gt; L (1 2 3) [3] & gt; (Setic * Print-Circle * T) T [4] & gt;  

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -