t3x.org / sketchy / vol1 / sl24.html

Sketchy LISP

  Copyright (C) 2006,2007 Nils M Holm
Buy a copy at Lulu.com

An Introduction to Functional Programming in Scheme

A.2 Table of Example Programs

add         add lists of digits
append2     append lists, tail recursive version
case        case syntax
checked-len length with non-local exit
complement  negate predicates
compose     function composition
copy        copy files
depth       depth of lists
depth       depth of lists, using HOFs
eql?        equality of lists of symbols
equal?      general equality predicate
expand-qq   quasiquote expander
explode     explode symbols
fact        factorial function
fact        factorial function, tail recursive version
filter      extract list elements
implode     implode lists of symbols
int->list   convert integer to list
kons        cons as a combinator
list->int   convert list to integer
map         map procedures over lists, variadic version
mapcar      map procedures over lists
max         maximum of arguments
max-list    maximum of a list
modulo      remainder of integer division
permute     permutations of strings
quine       a Scheme quine
read-line   read lines of characters
remove      remove list elements
reverse     reverse lists
reverse-syn reverse lists using syntax
rotations   rotations of a string
sub-strings substrings of a string
type        copy files to current output port
when        when syntax
Y           Y combinator