Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Clojureという言語が私逹にもたらしたもの

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for ayato ayato
June 30, 2018

 Clojureという言語が私逹にもたらしたもの

Hackers Champloo 2018の資料

Avatar for ayato

ayato

June 30, 2018
Tweet

More Decks by ayato

Other Decks in Programming

Transcript

  1. #hcmpl Clojureの読み方 (inc 1) ;;=> 2 (map inc '(1 2

    3)) ;;=> (2 3 4) 演算子(≒関数)
  2. #hcmpl Clojureの読み方 (inc 1) ;;=> 2 (map inc '(1 2

    3)) ;;=> (2 3 4) 被演算子(=引数)
  3. #hcmpl Clojureの読み方 (inc 1) ;;=> 2 (map inc '(1 2

    3)) ;;=> (2 3 4) フォーム(≒式)
  4. #hcmpl Clojureの読み方 (defn rename-keys [map kmap] (reduce (fn [m [old

    new]] (if (contains? map old) (assoc m new (get map old)) m)) (apply dissoc map (keys kmap)) kmap)) (rename-keys {:foo 1} {:foo :bar}) ;;=> {:bar 1}
  5. #hcmpl 特徴 •動的な開発 => REPL駆動開発 •関数プログラミング => 第一級関数 •Lisp =>

    S式 •実行時ポリモーフィズム => マルチメソッド •並行プログラミング => STM、イミュータブル •JVMにホストされた言語 => Java
  6. #hcmpl – Alan J. Perlis "It is better to have

    100 functions operate on one data structure than to have 10 functions operate on 10 data structures."