Functional Programming: what is an “improper list”?

前端 未结 9 1008
遥遥无期
遥遥无期 2020-11-27 04:38

Could somebody explain what an \"improper list\" is?

Note: Thanks to all ! All you guys rock!

9条回答
  •  离开以前
    2020-11-27 05:03

    In Common Lisp improper lists are defined as:

    • dotted lists that have a non-NIL terminating 'atom'.

    Example

      (a b c d . f)
    

    or

    • circular lists

    Example

      #1=(1 2 3 . #1#)
    

提交回复
热议问题