nil

"nil" is also a: user

created by TardisX
(thing) by mricicle (1.1 y) (print)   (I like it!) Wed May 30 2001 at 15:31:21

In SML, nil is the empty list, also written as [].

nil (or []) is often used as the base case of a recursive function that processes lists. Here is a small function that returns the sum of all elements in a list:

fun sum nil = 0
 |  sum (x::xs) = x + sum xs;

Together with the cons operator (::) nil can be used to create lists. For example, 1::2::3::nil results in the list [1,2,3]. This is mostly used to illustrate how lists are represented in SML. Usually you would just write [1,2,3] if you need that list in a program.

ariels says: Also in the Lisps (Common Lisp) and Scheme. Whether or not nil is an atom is a matter of much debate...

In Pascal (and Delphi), nil is the value of a null pointer, i.e. the special value that indicates that the pointer does not point to something.

(idea) by Jargon (2.1 y) (print)   (I like it!) Thu Jul 19 2001 at 12:53:37
Nightmare File System = N = Ninety-Ninety Rule

NIL /nil/

No. Used in reply to a question, particularly one asked using the `-P' convention. Most hackers assume this derives simply from LISP terminology for `false' (see also T), but NIL as a negative reply was well-established among radio hams decades before the advent of LISP. The historical connection between early hackerdom and the ham radio world was strong enough that this may have been an influence.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

(definition) by Webster 1913 (print) Wed Dec 22 1999 at 1:26:29

Nil (?). [See Nill, v. t.]

Will not.

[Obs.]

Chaucer.

 

© Webster 1913.


Nil, n. & a. [L., a contr. of nihil.]

Nothing; of no account; worthless; -- a term often used for canceling, in accounts or bookkeeping.

A. J. Ellis.

 

© Webster 1913.

Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.