summaryrefslogtreecommitdiffstats
path: root/final_project/work/notes
blob: 36793b137f95407275068674febcc88eb6dd6985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

Types in r5rS:
----------------------------------------------------------------
boolean, symbol, char, vector, pair, number, string, port, procedure

for numbers, the tower goes

 { number { complex { real { rational { integer }}}}}


Useful mechanics things (from manual/refman.txt):
----------------------------------------------------------------
I think a lot of these are r5rs

(type x)        
    returns the type (eg, *vector*)

(type-predicate x)
    returns a predicate that returns true for objects of the same type
    as x

(arity p)
    what it sounds like when p is a procedure

(structure? x)
    predicate for structured objects

(sigma f low high)
    sums over integers inclusive form low to high

Mechanics package primatives (?):
----------------------------------------------------------------
number, vector, matrix, function

unary operators go like ((U f) x) = (U (f x))

binary operators go like ((B f g) x) = (B (f x) (g x))

operators are functions that are "sticky" and act like multiplication?

the primative types might actually be a symbolic expression which would return
the same type, eg (*number* (sin (+ 4 'b)))

Other mechanics structures (?):
----------------------------------------------------------------

(up 1 2 3)
    "up" tuple

(down 4 5 6)
    "down" tuple

(matrix-by-rows '(1 2 3) '(4 5 6) '(7 8 9))
    M by N matrix

(series 0.5 0.4 0.3 0.2 0.1)
    power series with the given coefficients. serieses can be finite or streams

Literal functions
----------------------------------------------------------------
"->" is kind of like quote and takes two structures; this literal function 
maps from the first to the second.

Valid descriptors are:

X           cross product
Real        real (obviously)
UP          up tuple
DOWN        down tuple
UP*         variable length tuple of the same type (eg (UP* '*number* 5) )
DOWN*       same for down tuples


OTHER STUFF???
------------------------------
eigenvalues/vectors, roots of polynomials, display helpers (already)