summaryrefslogtreecommitdiffstats
path: root/final_project/work/examples.scm
diff options
context:
space:
mode:
Diffstat (limited to 'final_project/work/examples.scm')
-rw-r--r--final_project/work/examples.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/final_project/work/examples.scm b/final_project/work/examples.scm
new file mode 100644
index 0000000..314820b
--- /dev/null
+++ b/final_project/work/examples.scm
@@ -0,0 +1,29 @@
+
+; these could be considered as unit tests or demonstrations
+
+(describe 5.67)
+; This is a rational number
+
+(describe (up 3 4 5))
+; This is an "up" tuple of three integers
+
+(describe #(3.5 8 3))
+; This is a vector of three rational numbers
+
+(describe (*number* (sin (+ 4 'b))))
+; This is an expression with one variable which returns a number
+
+
+(describe-options (lambda (x y) (+ (* x 3) (square y))))
+; This is a procedure which accepts two arguments. You could:
+; 1) Evaluate for two inputs
+
+(describe-options (literal-function 'g (-> (X Real Real) Real)))
+; This is a math function which maps two reals to one real. You could:
+; 1) Evaluate numerically for two real inputs
+; 2) Differentiate symbolically for either variable
+; 3) Find the gradient function symbolically
+; 4) Plot in three dimensions over a given domain
+; 5) Plot in two dimensions for a fixed value of the first or second var
+; 6) Numerically calculate the maximum or minimum
+