Yoko Harada yokolet

View sentences.clj
1
(def sentences "The evening passed quietly, unmarked by anything extraordinary. The acknowledged lovers talked and laughed, the unacknowledged were silent. Darcy was not of a disposition in which happiness overflows in mirth; and Elizabeth, agitated and confused, rather knew that she was happy than felt herself to be so; for, besides the immediate embarrassment, there were other evils before her. She anticipated what would be felt in the family when her situation became known; she was aware that no one liked him but Jane; and even feared that with the others it was a dislike which not all his fortune and consequence might do away.")
View questions2.clj
1 2 3 4 5
(defn question2 [she he]
(let [possessive (fn [x] (str x "'s"))
hers (possessive she)
his (possessive he)]
(str "Hey " she ", are " hers " and " his " the same?")))
View right-triangle-test2.clj
1 2 3 4 5
(defn right-triangle2? [[a b c]]
(let [a-square (* a a)
b-square (* b b)
c-square (* c c)]
(= (+ a-square b-square) c-square)))
View right-triangle-test.clj
1 2 3 4 5 6
(defn right-triangle? [coll]
(let [a-square (* (nth coll 0) (nth coll 0))
b-square (* (nth coll 1) (nth coll 1))
c-square (* (nth coll 2) (nth coll 2))]
(= (+ a-square b-square) c-square)))
(right-triangle? [1 2 3])
View question.clj
1 2 3 4
(defn question [she he]
(let [hers (str she "'s")
his (str he "'s")]
(str "Hey " she ", are " hers " and " his " the same?")))
View right-and-left.clj
1 2 3 4 5 6 7 8 9 10
(defn right-and-left [size]
(letfn
[(go-right [x [start end]]
(cond
(< (inc x) end) (do #_(println "right") (go-right (inc x) [start end]))
(> (dec x) start) (go-left x [start (dec end)])
:else (println "done")))
(go-left [x [start end]]
(cond
(> (dec x) start) (do #_(println "left") (go-left (dec x) [start end]))
View trampoline-able-call.clj
1 2 3 4 5 6 7 8 9 10
(declare incrementor2 decrementor2)
 
(defn incrementor2 [n]
(let [_ (print (str n ", "))
next-val (+ n (rand-int 100))]
(if (< -10000 next-val)
#(decrementor2 next-val))))
 
(defn decrementor2 [n]
(let [_ (print (str n ", "))
View recursive-call.clj
1 2 3 4 5 6 7 8 9 10
(declare incrementor decrementor)
 
(defn incrementor [n]
(let [_ (print (str n ", "))
next-val (+ n (rand-int 100))]
(if (< -10000 next-val)
(decrementor next-val))))
 
(defn decrementor [n]
(let [_ (print (str n ", "))
View core.clj
1 2
(ns hello-hiccup.core
(:use [hiccup.core]))
View project.clj
1 2 3 4 5 6 7
(defproject hello-hiccup "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[hiccup "1.0.5"]])
Something went wrong with that request. Please try again.