summaryrefslogtreecommitdiff
path: root/src/lisp/test.lisp
blob: 37b550e0ad4e1cfab5fb1280d064f121392faac3 (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
(in-module "clojure")

(defn f0 ())

(defn f1 (x) x)

(defn f2 (x y) y)

(defn f5 (a b c d e) (d e) (f1 a))


(defn* f01
       (())
       ((x) x))

(defn fa (x)
      (.foo x))

(defn fk (x)
      (:foo x))

(defn fl (a b c)
      (let ((d (let ((x a))
                 x)))
        d)
      (let ((e c))
        e))

(defn fl* (a b c)
      (let* ((d b)
             (e d))
        e))

(defn always (x)
      (fn () x))

(defn fletfn (x)
      (letfn ((a (b) b)
              (c (d) (a d))
              (d (x) (d a)))
             (c x)))


(defn fif (a b x y z)
      (if a
          (if (if x y z)
              y
            z)
        b))

(defn fr (a b & c) c)