-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.lein-repl-history
133 lines (133 loc) · 4.01 KB
/
.lein-repl-history
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
total-de-vidas
(+ 10 2)
(* 7 6)
(/ 6 3)
(+ 4 (+ 1 2))
(- (+ 4 (+ 1 20)) 7)
(+ (* 5) 1)
(+ (* (/ 10 2) 5) 1)
(defn mult2 [x] (* x 2))
mult2 3
(mult2 3)
(def mult-square [x] (* x (+ 2 x) ))
(def mult-square [x] (* x (+ 2 x)))
(defn mult-square [x] (* x (+ 2 x)))
(mult-square 3)
(defn pow3 [x] (Math/pow x 2))
pow3 3
(pow3 3)
(def total-de-vidas)
total-de-vidas
(require '[forca.core :as forca] :reload)
(require '[alura_clojure_forca.core :as alura-clojure-forca] :reload)
(require '[alura-clojure-forca.core :as alura-clojure-forca] :reload)
(forca/perdeu)
(alura-clojure-forca/perdeu)
(require '[alura-clojure-forca.core :as alura-clojure-forca] :reload)
(alura-clojure-forca/perdeu)
(require '[alura-clojure-forca.core :as alura-clojure-forca] :reload)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 5)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 5)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 5)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 5)
(= 10 6)
(= 20 20)
(= 15 15)
(not= 10 10)
(not= 10 20)
(require '[alura-clojure-forca.core :as forca] :reload)
(fibo 1)
(fibo 0)
(fibo 3)
(fibo 8)
(require '[alura-clojure-forca.fibo :as fibo] :reload)
(require '[alura-clojure-forca.core :as forca] :reload)
fibo(1)
(fibo 1)
(fibo 0)
(fibo 10)
(fibo 8)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 5 "MELANCIA")
(forca/jogo 5 "MELANCIA" #{"A" "M")
(forca/jogo 5 "MELANCIA" #{"A" "M"})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 5 "MELANCIA" #{"A" "M"})
conjunto
(def conjunto #{"L" "M" "A"})
conjunto
(contains? conjunto "L")
(disj conjunto "L")
(def nums [1 2 3 4])
(defn mult [x] (* x 2))
(map mult nums)
(map (fn [x] (* x 3)) nums)
(defn par [x] (= 0 (rem x 2))))
(defn par [x] (= 0 (rem x 2)))
(remove par nums)
nums
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/letras-faltantes "MELANCIA" #{"M" "E"})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/letras-faltantes "MELANCIA" #{"M"})
(forca/jogo 5 "MELANCIA" #{"M"})
(forca/jogo 5 "MELANCIA" #{"M""E""L""A""L""A""N""C""I""A"})
(forca/jogo 5 "MELANCIA" #{"M" "E" "L" "A" "L" "A" "N" "C" "I" "A"})
(forca/jogo 5 "MELANCIA" #{"M" "E" "L" "A" "L" "N" "C" "I"})
(forca/jogo 5 "MELANCIA" #{"M" "E" "L" "A" "N" "C" "I"})
(def numeros [1 2 3 4 5])
(def carros [5000.0 6000.0])
carros
numeros
(remove )
(remove (= 1 (rem numeros 2)))
(remove (fn [x] (= 1 (rem x 2)) numeros))
(remove (fn [x] (= (rem x 2) 1)) numeros)
(map (fn [x] (* x 3)) numeros)
(filter (fn [x] (or (> x 2) (< x 4))))
(filter (fn [x] (or (> x 2) (< x 4)))
numeros
(filter (fn [x] (or (> x 2) (< x 4)) numeros)
numeros
(filter (fn [x] (or (< x 2) (> x 4)) numeros)
(filter (fn [x] (or (< x 2) (> x 4))) numeros)
(def palavra #{"A" "L" "U" "R"})
palavra
(contains? palavra "A")
(contains? palavra "0")
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(* 7 (Integer/parseInt "3"))
(* 7 (Integer/parseInt le-letra!))
(* 7 (Integer/parseInt (le-letra!)))
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/soma 5)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/soma 5)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/soma 5)
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
(require '[alura-clojure-forca.core :as forca] :reload)
(forca/jogo 2 "MELANCIA" #{})
carros
(map (fn [x] (* x 2) carros)
(map (fn [x] (* x 2) carros))
(map (fn [x] (* x 2)) carros)
(map (fn [x] (* x 2)) (map (fn [x] (- x 200)) carros))
(require '[alura-clojure-forca.core :as forca] :reload)
lein run