-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaux_input
175 lines (114 loc) · 2.46 KB
/
aux_input
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
(or false nil 1 2 3)
(or nil nil false false)
(and 1 2 false nil 1 2 3)
(and 1 2 3 '(1 2 3))
(def a ( (and * str inc) 1 ) )
(def a '(1 2 3))
(println a)
(conj a 4)
(conj '(1 2 3) "Hola")
(conj a '(8 "Hola2"))
(reduce + [1 2 3 4])
(+ (+ (+ 1 2) 3) 4)
(if (<= 1 -1)
(do
(+ 1 2)
(- 1 2)
(* 4 4)
)
(- 1 2)
)
(defn hola "hola"
([a]
(+ a 1) (* a 4))
([c d]
(println (+ c c))
(* d d))
)
(hola 1 2)
(def flag 4)
(defn hola [a b] (println ((or nil + 2 3) a b)) )
(defn x-chop
"Describe the kind of chop you're inflicting on someone"
([name chop-type]
(if (<= 1 2 3 4 flag)
(do
((and 1 4 "hola" hola ) 1 2)
((or * str inc) 4 8)
)
(do
(def x 0)
(let [x 1] (println x))
(println x)
)
)
(str "I " chop-type " chop " name "! Take that!"))
([name]
(recur name "karate")))
(x-chop "Kanye West" "slap")
(def flag 3)
(x-chop "Kanye East")
(def v [1])
(def i 2)
(loop [iteration 1]
(println (str "Iteration " iteration))
(let [aux i] (conj v aux))
(println (reduce + v) )
(def i (inc i))
(if (> iteration 2)
(println "Goodbye!")
(recur (inc iteration))
)
)
( (and * 1 str (fn [a] (* a a)) ) 2)
(def lista (conj '(4 5 6) "hola"))
(println lista)
(def name (nth lista 0))
(println name)
(defn hola "hola"
([a] (+ a 1) (* a 4))
([c d]
(println (+ c c))
(* d d))
)
(hola 1)
(hola 3 4)
(def a 2)
(println a)
(def a 1)
(println a)
(defn hola "hola" [b c d] (println (+ a a 4)) (println (+ b b -8)) (println (/ c c 1)) (* d d (+ 1 1)))
(hola (+ 1 3) 4 5)
(defn hola "hola" [q e & f] (print "hola") (println q))
(defn hola2 "hola" [a b c] (println "hola"))
(hola2 4 2 3)
(hola (hola2 1 2 3) 4 6 7)
(defn my-first
[ a b [first-thing] c [second-thing]]
(println a)
(println b)
(println c)
(println first-thing)
(println second-thing)
)
(my-first "hola1" "hola2" ["oven" "bike" "war-axe"] "hola3" ["oven" "bike" "war-axe"])
'(1 2 3)
(def a '(1 2 3))
(println a)
(conj a 4)
(conj '(1 2 3) "Hola")
(conj a '(8 "Hola"))
#{11 1 1 2 2 4 3 "Hola" "Hola" #{1 2 3 4} #{1 2 3 4 5} #{1 2 3 4} '(1 2 3) '(1 2 3)}
(conj #{1 2 3 4 5 #{1 2}} 1)
(or false nil 1 2 3)
(or nil nil false false)
(and 1 2 false nil 1 2 3)
(and 1 2 3 '(1 2 3))
(loop [iteration 0]
(println (str "Iteration " iteration))
(if (> iteration 3)
(println "Goodbye!")
(recur (inc iteration)) ))
(= 1)
(= 1 1)
(> 4 3 2 1)