SlideShare a Scribd company logo
Programming Lisp
     Clojure
  2   :




               :
           :   (   )
(   )




:
.


              .


(   ())           .
(Reader)
-
                            .

           (Reader Macro)
-
                                .
-                                   .
#(body %)       (fn [params*] body)

                             ;

  deref         @form        (deref form)

  meta           ^form       (meta form)          meda data

meat data           #^metadata form

                 ‘form       (quote form)         form

            #”foo” => a java.util.regex.Pattern

                            `x

                            ~

                           ~@

var-quote            #’x         (var x)
(boolean) / nil          true, false

(character)                  a

   (keyword)              :tag, :doc

  (map)            {:name “Bill”, :age 42}

 (number)                   1, 4.2

   (string)                “hello”

  (symbol)        user/foo, java.lang.String
(symbol)

        .
-
-   (          )
-
-       : /(   ), .(       )
-                  (ref)



-                      .
(number)

-                                           .
-                                        BigDecimal(   M), BigInteger
             .


- BigDecimal                                                .
-                                                                       .


-         : +, -, /, *, >, >=, <, =
-             : quot(          ), rem(     )


-   42 => 42
-   [1 2 3] => [1 2 3]
-   (/ 22 7) => 22/7
-   (/ 22.0 7) => 3.142857142857143
-   (+) => 0
-   (+ 1 (/ 0.00001M 1000000000000000000) ) => 1.00000000000000000000001M
(boolean) / nil
                         .


- ture, 0, () =
- false, nil =


- nil    false       .
- nil/false                  (    list = ()/0 = zero)   true        .


-           :                                    .
                                 (?)         .
                                                             ture       .


-   (true? true) => true
-   (false? “foo”) => false
-   (zero? 0.0) => true
-   (nil? nil) => true
-   (if () “In Clojure” “in Common Lisp”) => “In Clojlure”
-   (if 0 “Zero” “NonZero”) => “Zero”
(character)
              .
-         ,    (     )                     .
-             (backspace),    (formfeed,           ),        (newline),    (return),
     (space), (tab)                                .


-


-                                              .
- str :       ( )
          toString                                           nil            .


- (str     ) =>
- (str  space  ) =>
- (str  backspace  formfeed     newline          newline    tab  ) =>       b
   f n n t
(string)
                    .
-                           .
-                                          .


-            (“”)


-                                                                   .
- interleave :                                                                .
- apply str :                                        interleave
                        .
                                                                                         .
- take-nth                      :1             ,
                                .


- (str 1 2 nil 3) => “123”
- (apply str (take-nth 3 (apply str (interleave "Attack midnight" "The pur" "None"))))
=> “Atta”
(map)
  /                .
                                    (hash-code)
  .


-         {}           .
-{         }                   .


- def :        ,                      .
- get :                    .

  .


- (def names {“     ”“             ”}) => #‘user /names
- (get names “     ”) => “            ”
- (get names “     ”“               ”) => “        ”
(keyword)
                                                .
-                                   .



-           (:)           .



- defstruct :                           ( )              .
- struct :                          .
- struct-map :                           ( )                          .



-   (def nations {:       “         ”} => #‘user/nations
-   (nations :       )         (:          nations) => “     ”
-   (defstruct names :         ) => #‘user/names
-   (struct names “           ”) => {:        "          "}
-   (struct-map names :           “         ”) => {:        "    "}
.
-                                                                    .



- (defn                                   [       ...]   )
  :                          .
           &                                                 .
- #(      %1, %2 ... )       (fn [    ]       )
  :                      .



- (defn get “return” [user] (str “Hello, “ user)
  (get “world”) => “Hello, world”
- (defn get [hello]
  (fn [user] (str get “,” user)))
  (defn get2 (get “Hello”)
  (get2 “world” => “Hello, world”)
.



- (def         defn           var ) :    var           .(
  .)
- (var     )           #’       : var          .



- (let [              ... ]     ):
                                     .
:
                                 (name space)             .


-             =>


- (resolve      ):                                                .
- (in-ns     ):                                .
- (import ‘(                            )) :
   .                                               .
- (require ‘                ):                                                         .
- (use ‘               ):
                 .
- (use :reload ‘                  ):                          .
- (use :reload-all ‘                    ):                                         .
- (ns                                  ):              , :import, :require, :use
   .


- (in-us ‘newworld) => newworld=>
.
-      (      )                      .


- {:                      }


-   (with-mata                                ):               .
-   (identical?       1         2        ):            .
-   (meta         )       ^               :                        .
-   (assoc                 ....) :                         .
.(
        )
- var       .


- #^
:
     if            /

    do

loop / recur

    for
if
                                .
-                           .



- (if (   )           )



- (if (< 50 0) "yes" "no") => “no”



- when / when-not :
do

                                                          .


- (do            ....)


-   (if (< 50 0) (do (println "haha") "yes") (do (println "   ")

(println "haha") "no")) =>        | haha | "no"
loop / recur
                        .
- loop : let                       recur              .
- recur : loop
       .



- (loop [                   ...]    )
- (recur         ...)



- (loop [n [] x 5] (if (zero? x) (println n) (recur (conj n x) (- x 1)))) =>
[5 4 3 2 1] | nil
for

                                  .



- (for [                          ...]    )



- (for [file "ABC"] (format "%c" file)) => ("A"
"B" "C")
(boolean) / nil          true, false

(character)                  a

   (keyword)              :tag, :doc

  (map)            {:name “Bill”, :age 42}

 (number)                   1, 4.2

   (string)                “hello”

  (symbol)        user/foo, java.lang.String
:
if / (form?)       /

    do

loop / recur

    for
QnA
Ad

More Related Content

What's hot (20)

Introduction to Groovy
Introduction to GroovyIntroduction to Groovy
Introduction to Groovy
André Faria Gomes
 
Exhibition of Atrocity
Exhibition of AtrocityExhibition of Atrocity
Exhibition of Atrocity
Michael Pirnat
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009
Jordan Baker
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
Ke Wei Louis
 
Fertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureFertile Ground: The Roots of Clojure
Fertile Ground: The Roots of Clojure
Mike Fogus
 
밑바닥부터 시작하는 의료 AI
밑바닥부터 시작하는 의료 AI밑바닥부터 시작하는 의료 AI
밑바닥부터 시작하는 의료 AI
NAVER Engineering
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter Bootstrap
Howard Lewis Ship
 
Code as data as code.
Code as data as code.Code as data as code.
Code as data as code.
Mike Fogus
 
Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014
Baruch Sadogursky
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order Functions
David Golden
 
Stupid Awesome Python Tricks
Stupid Awesome Python TricksStupid Awesome Python Tricks
Stupid Awesome Python Tricks
Bryan Helmig
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
niklal
 
Palestra sobre Collections com Python
Palestra sobre Collections com PythonPalestra sobre Collections com Python
Palestra sobre Collections com Python
pugpe
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. Experience
Mike Fogus
 
Android Guava
Android GuavaAndroid Guava
Android Guava
丞廷 鄭
 
An Elephant of a Different Colour: Hack
An Elephant of a Different Colour: HackAn Elephant of a Different Colour: Hack
An Elephant of a Different Colour: Hack
Vic Metcalfe
 
Groovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony CodeGroovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony Code
stasimus
 
Haskell in the Real World
Haskell in the Real WorldHaskell in the Real World
Haskell in the Real World
osfameron
 
Academy PRO: ES2015
Academy PRO: ES2015Academy PRO: ES2015
Academy PRO: ES2015
Binary Studio
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
 
Exhibition of Atrocity
Exhibition of AtrocityExhibition of Atrocity
Exhibition of Atrocity
Michael Pirnat
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009
Jordan Baker
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
Ke Wei Louis
 
Fertile Ground: The Roots of Clojure
Fertile Ground: The Roots of ClojureFertile Ground: The Roots of Clojure
Fertile Ground: The Roots of Clojure
Mike Fogus
 
밑바닥부터 시작하는 의료 AI
밑바닥부터 시작하는 의료 AI밑바닥부터 시작하는 의료 AI
밑바닥부터 시작하는 의료 AI
NAVER Engineering
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter Bootstrap
Howard Lewis Ship
 
Code as data as code.
Code as data as code.Code as data as code.
Code as data as code.
Mike Fogus
 
Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014Groovy puzzlers по русски с Joker 2014
Groovy puzzlers по русски с Joker 2014
Baruch Sadogursky
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order Functions
David Golden
 
Stupid Awesome Python Tricks
Stupid Awesome Python TricksStupid Awesome Python Tricks
Stupid Awesome Python Tricks
Bryan Helmig
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
niklal
 
Palestra sobre Collections com Python
Palestra sobre Collections com PythonPalestra sobre Collections com Python
Palestra sobre Collections com Python
pugpe
 
Naïveté vs. Experience
Naïveté vs. ExperienceNaïveté vs. Experience
Naïveté vs. Experience
Mike Fogus
 
An Elephant of a Different Colour: Hack
An Elephant of a Different Colour: HackAn Elephant of a Different Colour: Hack
An Elephant of a Different Colour: Hack
Vic Metcalfe
 
Groovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony CodeGroovy vs Boilerplate and Ceremony Code
Groovy vs Boilerplate and Ceremony Code
stasimus
 
Haskell in the Real World
Haskell in the Real WorldHaskell in the Real World
Haskell in the Real World
osfameron
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
 

Similar to Programming Lisp Clojure - 2장 : 클로저 둘러보기 (20)

The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
jaxLondonConference
 
(first '(Clojure.))
(first '(Clojure.))(first '(Clojure.))
(first '(Clojure.))
niklal
 
The groovy puzzlers (as Presented at JavaOne 2014)
The groovy puzzlers (as Presented at JavaOne 2014)The groovy puzzlers (as Presented at JavaOne 2014)
The groovy puzzlers (as Presented at JavaOne 2014)
GroovyPuzzlers
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
 
Hw09 Hadoop + Clojure
Hw09   Hadoop + ClojureHw09   Hadoop + Clojure
Hw09 Hadoop + Clojure
Cloudera, Inc.
 
Clojure入門
Clojure入門Clojure入門
Clojure入門
Naoyuki Kakuda
 
Term Rewriting
Term RewritingTerm Rewriting
Term Rewriting
Eelco Visser
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
thnetos
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
elliando dias
 
Python basic
Python basic Python basic
Python basic
sewoo lee
 
Clojure for Java developers - Stockholm
Clojure for Java developers - StockholmClojure for Java developers - Stockholm
Clojure for Java developers - Stockholm
Jan Kronquist
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
dudarev
 
The Magnificent Seven
The Magnificent SevenThe Magnificent Seven
The Magnificent Seven
Mike Fogus
 
Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議
dico_leque
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
Baishampayan Ghose
 
Frege is a Haskell for the JVM
Frege is a Haskell for the JVMFrege is a Haskell for the JVM
Frege is a Haskell for the JVM
jwausle
 
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
Little Tukta Lita
 
ddd+scala
ddd+scaladdd+scala
ddd+scala
潤一 加藤
 
Basics
BasicsBasics
Basics
Logan Campbell
 
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Eelco Visser
 
The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)The Curious Clojurist - Neal Ford (Thoughtworks)
The Curious Clojurist - Neal Ford (Thoughtworks)
jaxLondonConference
 
(first '(Clojure.))
(first '(Clojure.))(first '(Clojure.))
(first '(Clojure.))
niklal
 
The groovy puzzlers (as Presented at JavaOne 2014)
The groovy puzzlers (as Presented at JavaOne 2014)The groovy puzzlers (as Presented at JavaOne 2014)
The groovy puzzlers (as Presented at JavaOne 2014)
GroovyPuzzlers
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
 
Clojure Intro
Clojure IntroClojure Intro
Clojure Intro
thnetos
 
Python basic
Python basic Python basic
Python basic
sewoo lee
 
Clojure for Java developers - Stockholm
Clojure for Java developers - StockholmClojure for Java developers - Stockholm
Clojure for Java developers - Stockholm
Jan Kronquist
 
CL metaprogramming
CL metaprogrammingCL metaprogramming
CL metaprogramming
dudarev
 
The Magnificent Seven
The Magnificent SevenThe Magnificent Seven
The Magnificent Seven
Mike Fogus
 
Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議Meta-objective Lisp @名古屋 Reject 会議
Meta-objective Lisp @名古屋 Reject 会議
dico_leque
 
Frege is a Haskell for the JVM
Frege is a Haskell for the JVMFrege is a Haskell for the JVM
Frege is a Haskell for the JVM
jwausle
 
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
โปรแกรมย่อยและฟังชั่นมาตรฐาน ม.6 1
Little Tukta Lita
 
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Model-Driven Software Development - Pretty-Printing, Editor Services, Term Re...
Eelco Visser
 
Ad

More from JangHyuk You (8)

게임 프로그래머를 위한 기초 수학 및 물리 - 8장
게임 프로그래머를 위한 기초 수학 및 물리 - 8장게임 프로그래머를 위한 기초 수학 및 물리 - 8장
게임 프로그래머를 위한 기초 수학 및 물리 - 8장
JangHyuk You
 
게임 프로그래머를 위한 기초 수학 및 물리 - 9장
게임 프로그래머를 위한 기초 수학 및 물리 - 9장게임 프로그래머를 위한 기초 수학 및 물리 - 9장
게임 프로그래머를 위한 기초 수학 및 물리 - 9장
JangHyuk You
 
도메인 주도 설계 - 6장 도메인 객체의 생명주기
도메인 주도 설계 - 6장 도메인 객체의 생명주기도메인 주도 설계 - 6장 도메인 객체의 생명주기
도메인 주도 설계 - 6장 도메인 객체의 생명주기
JangHyuk You
 
Mongo DB 완벽가이드 - 4장 쿼리하기
Mongo DB 완벽가이드 - 4장 쿼리하기Mongo DB 완벽가이드 - 4장 쿼리하기
Mongo DB 완벽가이드 - 4장 쿼리하기
JangHyuk You
 
프로그래머가 몰랐던 멀티코어 CPU 이야기 - 15, 16장
프로그래머가 몰랐던 멀티코어  CPU 이야기 - 15, 16장프로그래머가 몰랐던 멀티코어  CPU 이야기 - 15, 16장
프로그래머가 몰랐던 멀티코어 CPU 이야기 - 15, 16장
JangHyuk You
 
TAOCP1 - 2.2.2 - 순차할당
TAOCP1 - 2.2.2 - 순차할당TAOCP1 - 2.2.2 - 순차할당
TAOCP1 - 2.2.2 - 순차할당
JangHyuk You
 
TAOCP1 - 1.2.11.1 - O 표기법
TAOCP1 - 1.2.11.1 - O 표기법TAOCP1 - 1.2.11.1 - O 표기법
TAOCP1 - 1.2.11.1 - O 표기법
JangHyuk You
 
IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다
IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다
IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다
JangHyuk You
 
게임 프로그래머를 위한 기초 수학 및 물리 - 8장
게임 프로그래머를 위한 기초 수학 및 물리 - 8장게임 프로그래머를 위한 기초 수학 및 물리 - 8장
게임 프로그래머를 위한 기초 수학 및 물리 - 8장
JangHyuk You
 
게임 프로그래머를 위한 기초 수학 및 물리 - 9장
게임 프로그래머를 위한 기초 수학 및 물리 - 9장게임 프로그래머를 위한 기초 수학 및 물리 - 9장
게임 프로그래머를 위한 기초 수학 및 물리 - 9장
JangHyuk You
 
도메인 주도 설계 - 6장 도메인 객체의 생명주기
도메인 주도 설계 - 6장 도메인 객체의 생명주기도메인 주도 설계 - 6장 도메인 객체의 생명주기
도메인 주도 설계 - 6장 도메인 객체의 생명주기
JangHyuk You
 
Mongo DB 완벽가이드 - 4장 쿼리하기
Mongo DB 완벽가이드 - 4장 쿼리하기Mongo DB 완벽가이드 - 4장 쿼리하기
Mongo DB 완벽가이드 - 4장 쿼리하기
JangHyuk You
 
프로그래머가 몰랐던 멀티코어 CPU 이야기 - 15, 16장
프로그래머가 몰랐던 멀티코어  CPU 이야기 - 15, 16장프로그래머가 몰랐던 멀티코어  CPU 이야기 - 15, 16장
프로그래머가 몰랐던 멀티코어 CPU 이야기 - 15, 16장
JangHyuk You
 
TAOCP1 - 2.2.2 - 순차할당
TAOCP1 - 2.2.2 - 순차할당TAOCP1 - 2.2.2 - 순차할당
TAOCP1 - 2.2.2 - 순차할당
JangHyuk You
 
TAOCP1 - 1.2.11.1 - O 표기법
TAOCP1 - 1.2.11.1 - O 표기법TAOCP1 - 1.2.11.1 - O 표기법
TAOCP1 - 1.2.11.1 - O 표기법
JangHyuk You
 
IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다
IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다
IT 개발자가 쓴 통쾌한 인간관리 이야기 - Part2 : 프로세스가 제품이다
JangHyuk You
 
Ad

Recently uploaded (20)

Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
How to Clean Your Contacts Using the Deduplication Menu in Odoo 18
Celine George
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
All About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdfAll About the 990 Unlocking Its Mysteries and Its Power.pdf
All About the 990 Unlocking Its Mysteries and Its Power.pdf
TechSoup
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM Mia eStudios
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
Botany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic ExcellenceBotany Assignment Help Guide - Academic Excellence
Botany Assignment Help Guide - Academic Excellence
online college homework help
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
MCQ PHYSIOLOGY II (DR. NASIR MUSTAFA) MCQS)
Dr. Nasir Mustafa
 

Programming Lisp Clojure - 2장 : 클로저 둘러보기

  • 1. Programming Lisp Clojure 2 : : : ( )
  • 2. ( ) :
  • 3. . . ( ()) .
  • 4. (Reader) - . (Reader Macro) - . - .
  • 5. #(body %) (fn [params*] body) ; deref @form (deref form) meta ^form (meta form) meda data meat data #^metadata form ‘form (quote form) form #”foo” => a java.util.regex.Pattern `x ~ ~@ var-quote #’x (var x)
  • 6. (boolean) / nil true, false (character) a (keyword) :tag, :doc (map) {:name “Bill”, :age 42} (number) 1, 4.2 (string) “hello” (symbol) user/foo, java.lang.String
  • 7. (symbol) . - - ( ) - - : /( ), .( ) - (ref) - .
  • 8. (number) - . - BigDecimal( M), BigInteger . - BigDecimal . - . - : +, -, /, *, >, >=, <, = - : quot( ), rem( ) - 42 => 42 - [1 2 3] => [1 2 3] - (/ 22 7) => 22/7 - (/ 22.0 7) => 3.142857142857143 - (+) => 0 - (+ 1 (/ 0.00001M 1000000000000000000) ) => 1.00000000000000000000001M
  • 9. (boolean) / nil . - ture, 0, () = - false, nil = - nil false . - nil/false ( list = ()/0 = zero) true . - : . (?) . ture . - (true? true) => true - (false? “foo”) => false - (zero? 0.0) => true - (nil? nil) => true - (if () “In Clojure” “in Common Lisp”) => “In Clojlure” - (if 0 “Zero” “NonZero”) => “Zero”
  • 10. (character) . - , ( ) . - (backspace), (formfeed, ), (newline), (return), (space), (tab) . - - . - str : ( ) toString nil . - (str ) => - (str space ) => - (str backspace formfeed newline newline tab ) => b f n n t
  • 11. (string) . - . - . - (“”) - . - interleave : . - apply str : interleave . . - take-nth :1 , . - (str 1 2 nil 3) => “123” - (apply str (take-nth 3 (apply str (interleave "Attack midnight" "The pur" "None")))) => “Atta”
  • 12. (map) / . (hash-code) . - {} . -{ } . - def : , . - get : . . - (def names {“ ”“ ”}) => #‘user /names - (get names “ ”) => “ ” - (get names “ ”“ ”) => “ ”
  • 13. (keyword) . - . - (:) . - defstruct : ( ) . - struct : . - struct-map : ( ) . - (def nations {: “ ”} => #‘user/nations - (nations : ) (: nations) => “ ” - (defstruct names : ) => #‘user/names - (struct names “ ”) => {: " "} - (struct-map names : “ ”) => {: " "}
  • 14. . - . - (defn [ ...] ) : . & . - #( %1, %2 ... ) (fn [ ] ) : . - (defn get “return” [user] (str “Hello, “ user) (get “world”) => “Hello, world” - (defn get [hello] (fn [user] (str get “,” user))) (defn get2 (get “Hello”) (get2 “world” => “Hello, world”)
  • 15. . - (def defn var ) : var .( .) - (var ) #’ : var . - (let [ ... ] ): .
  • 16. : (name space) . - => - (resolve ): . - (in-ns ): . - (import ‘( )) : . . - (require ‘ ): . - (use ‘ ): . - (use :reload ‘ ): . - (use :reload-all ‘ ): . - (ns ): , :import, :require, :use . - (in-us ‘newworld) => newworld=>
  • 17. . - ( ) . - {: } - (with-mata ): . - (identical? 1 2 ): . - (meta ) ^ : . - (assoc ....) : .
  • 18. .( ) - var . - #^
  • 19. : if / do loop / recur for
  • 20. if . - . - (if ( ) ) - (if (< 50 0) "yes" "no") => “no” - when / when-not :
  • 21. do . - (do ....) - (if (< 50 0) (do (println "haha") "yes") (do (println " ") (println "haha") "no")) => | haha | "no"
  • 22. loop / recur . - loop : let recur . - recur : loop . - (loop [ ...] ) - (recur ...) - (loop [n [] x 5] (if (zero? x) (println n) (recur (conj n x) (- x 1)))) => [5 4 3 2 1] | nil
  • 23. for . - (for [ ...] ) - (for [file "ABC"] (format "%c" file)) => ("A" "B" "C")
  • 24. (boolean) / nil true, false (character) a (keyword) :tag, :doc (map) {:name “Bill”, :age 42} (number) 1, 4.2 (string) “hello” (symbol) user/foo, java.lang.String
  • 25. : if / (form?) / do loop / recur for
  • 26. QnA
  翻译: