This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns dop-examples | |
(:require | |
[clojure.spec.alpha :as s] | |
[clojure.string :as str])) | |
;;; 原則 #1: コードをデータから切り離す | |
(defn make-author [first-name last-name num-of-books] | |
{:first-name first-name | |
:last-name last-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (def xs [1 2 3]) | |
#'user/xs | |
;; Clojureの `[ ]` リテラルで得られるvector (シーケンシャルコレクションの一種)実装は独自のイミュータブルコレクション | |
user=> (class xs) | |
clojure.lang.PersistentVector | |
;; java.util.Listを実装している | |
user=> (instance? java.util.List xs) | |
true | |
;; 破壊的更新操作は実装されていないため実行時エラーになる | |
user=> (java.util.Collections/sort xs >) |
(defprofile lagénorhynque
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# npm install -g reveal-md | |
reveal-md team-geek-revisited.md --theme night --highlight-theme monokai-sublime -w $@ |
(defprofile lagénorhynque
NewerOlder