A Collection of General Purpose Tools


In some non-Logo programming environments, loading a new program file will automatically overwrite any program code currently in the computer's memory. One important advantage of the Logo notion of the workspace, by contrast, is that a microworld can be built up incrementally by loading a succession of Logo files each of which contains a different set of procedures. Loading new procedures which have the same names as existing procedures will understandably overwrite the previous definitions (this is in effect just like using the normal editing process to modify the procedure code), but any other new procedures simply join those that already in the workspace and co-exist happily there.

To take advantage of this possibility, it is useful to build up a stock of general-purpose tools which are then ready to be loaded as required whenever anew system is being developed. This page gives access to a collection of such procedures (or groups of procedures). Saved as plain text files, these should load directly into Logo. Alternatively, they can be copied and pasted from the screen.

[There should be a short comment here to describe the purpose of the tool and any peculiar characteristics of the procedure code. For the moment you will need to work it out for yourself. The names are hopefully fairly transparent.]

apply

ends.with?

explode

implode

findall

forall?

get (with key)

leftmost n elements

rightmost n elements

map

padding outwords

pickrandom

position

remove

remove (all occurrences)

remove duplicates

replace

replace (all occurrences)

reverse

stacks and queues

starts.with?

subset?

substring?

unpack (or flatten)

vprint


Ron Brasington
Department of Linguistic Science
The University of Reading
Reading
UK
E-mail: ron.brasington@rdg.ac.uk