Commit 9f8a8b50 authored by Chris Müller's avatar Chris Müller
Browse files

More examples for feature introduction

parent 14000c0a
......@@ -24,9 +24,9 @@
;; List defintion
(define (point x y z)
(let with-cons (cons x (cons y (cons z '()))))
(let with-list (list x y z))
with-list)
(let withcons (cons x (cons y (cons z '()))))
(let withlist (list x y z))
withlist)
;; Tuple definition (vectors)
(define (pointd x y z)
......@@ -36,7 +36,7 @@
(define (function a b)
(println a " --- " b))
;; Lambda expressions (anonymous function
;; Lambda expressions (anonymous functions)
(define (bla a)
(let smaller (lambda (b) (< a b)))
(smaller 10))
......@@ -57,5 +57,8 @@
(add (+ x 1) (cons x xs))
(cons (+ x 1) xs))))
;; exit methods
(define (quit) (exit 0))
(define (abort) (exit 1))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment