SketchyLISP Reference Manual - Copyright (C) 2005 Nils M Holm

6b Extension Library Functions

6.1 List Functions

count Recursively count the atoms of a list. Ext.
depth Compute the depth of a list. Ext.
explode Explode a symbol into single-char symbols. Ext.
filter Extract members from a list that match a given predicate. Ext.
head? Check whether an expression X is the head of an expression Y. Ext.
implode Implode a list of single-char symbols into a symbol. Ext.
insert Insert a member into an ordered list. Ext.
iota Generate a sequence of natural numbers. Ext.
isort Sort a list using insertion sort. Ext.
last Extract the last member of a list. Ext.
maplist Apply a function to each CDR of a list. Ext.
not-equal? Compare two lists (S-expressions, in fact) with negative result. Ext.
ordered? Check whether the members of a list are in a given monotonic order. Ext.
pair Build an association list from two lists. Ext.
quicksort Sort a list using the Quicksort algorithm. Ext.
reduce Reduce a list. Ext.
remove Remove members from lists. Ext.
sort Sort a list. Ext.
sublist Substitute variables in S-expressions. Ext.
subst Substitute X for each occurence of Y in Z. Ext.
tail? Check if an expression X is the tail of an expression Y. Ext.
unsort Generate some entropy by un-sorting a list of natural numbers. Ext.

6.2 Logic and Combinatoric Functions

any? Verify that at least one member of a list has a given property. Ext.
every? Verify that all members of a list have a given property. Ext.
intersection Compute the intersection of two sets. Ext.
member? Check whether a list has a member that is equal to a given S-expression. Ext.
memq? Check whether a list has a member that is equal to a given symbol. Ext.
neq? Negative identity. Ext.
permute Generate permutations of a set. Ext.
some Extract the tail of a list where the first member of the tail has a given property. Ext.
union Compute the union of two sets. Ext.
unique Transform a list into a set (a list containing only unique elements). Ext.

6.3 Numeric Functions

fact Compute X!. Ext.
one? Test a number for being one. Ext.
hyper Compute A hyperN B. Ext.
product Compute the product of a sequence of positive numbers. Ext.
sum Compute the sum of a sequence of positive numbers. Ext.

6.4 Library Loaders

sketchy-ext Load the SketchyLISP extension library into memory. Ext.