Copyright ã 1994 by Sean Luke

COWS
Standard Function Library
COWS Version 1.4
May 29, 1994

COWS generally comes with a very small Standard Function Library intended to provide the minimal tools a user might need to communicate with an application.  Other libraries will follow to add power to the language, but are not mandatory.  These libraries might include array-manipulation, inter-process communication, string manipulation, and better math control. 

It's accepted that, except under special circumstances, all COWS-compliant applications should include at least this library.  Unlike some other libraries, it won't add much to the size of the application, so don't worry too much.

Library Functions
	
In the Standard Function Library the following function definitions are sometimes given with items like value+, which means one or more values, or value*, which means zero or more values.
	
Control
do		Performs each value, then returns the last.
	(do value* value)
	
do-first	Performs each value, then returns the first.
	(do-first value value*)

Response
print		Prints values out to stdout, with a newline after each. 
			Returns the first value.	
	(print value*)

error		Flags as an error message value.
	(error value)

General Predicates
is		Determines if several string values are the same.  Returns t or f.
	(is value+)

Truth Tables
and		ANDs several values, which should be truths (else they're taken as f).  
	(and value+)

or		ORs several values, which should be truths (else they're taken as f).
	(and value+)

not		NOTs a value, which should be a truth (else it's taken as f).
	(not value)

Strings
concatenate	Concatenates several string values, returning the result.
	(concatenate value*)
	
quote	Returns a double-quote ".  Because quotes are delimeters, a quote can't
		be quoted (put in a string constant).  Quote would be used as in 
		Þ	(concatenate "Call me " (quote) "John" (quote) ".")  
		which would return:  Call me "John".
	(quote)

Math
=		Determines if several numerical values are the same.  Returns t or f.
	(= value+)

<		Does what you'd expect.  Non-numbers are 0.  Returns t or f.
	(< value value)
	
>		Does what you'd expect.  Non-numbers are 0.  Returns t or f.
	(> value value)
	
+		Adds several values.  Non-numbers are 0.  Returns the result.
	(+ value+)
	
*		Multiplies several values.  Non-numbers are 0.  Returns the result.
	(* value+)
	
-		Subtracts several values from a first value.  Non-numbers are 0. 
		Returns the result.
	(- value value*)
	
/		Divides several values into a value.  Mathematically: (((v1/v2)/v3)/v4)...  
		Non-numbers are 0.  Returns the result.  Flags an error if divide-by-zero.
	(/ value value*)