LOGO Commands 7

These command descriptions were adapted from the Berkeley Logo User Manual, Copyright 1993 by the Regents of the University of California.




DATA STRUCTURE PRIMITIVES
=========================

CONSTRUCTORS
------------

LIST thing1 thing2
(LIST thing1 thing2 thing3 ...)

	outputs a list whose members are its inputs, which can be any
	Logo datum (word, list, or array).

FPUT thing list

	outputs a list equal to its second input with one extra member,
	the first input, at the beginning.

LPUT thing list

	outputs a list equal to its second input with one extra member,
	the first input, at the end.

REVERSE list						(library procedure)

	outputs a list whose members are the members of the input list, in
	reverse order.


SELECTORS
---------

FIRST thing

	if the input is a word, outputs the first character of the word.
	If the input is a list, outputs the first member of the list.
	If the input is an array, outputs the origin of the array (that
	is, the INDEX OF the first member of the array).

LAST wordorlist

	if the input is a word, outputs the last character of the word.
	If the input is a list, outputs the last member of the list.

BUTFIRST wordorlist
BF wordorlist

	if the input is a word, outputs a word containing all but the first
	character of the input.  If the input is a list, outputs a list
	containing all but the first member of the input.

BUTLAST wordorlist
BL wordorlist

	if the input is a word, outputs a word containing all but the last
	character of the input.  If the input is a list, outputs a list
	containing all but the last member of the input.


PREDICATES
----------

EMPTYP thing
EMPTY? thing

	outputs TRUE if the input is the empty word or the empty list,
	FALSE otherwise.


Mtht420