Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Functional
- design pattern
- Observer
- ranges
- CustomTab
- Scala
- program
- traits
- c++
- SHA512
- Clojure
- web
- async
- sprintf
- kotlin
- AES
- Chrono
- ChromeTab
- go
- Reflect
- stringprintf
- WebView
- coroutines
- template
- RAII
- type_traits
- sha256
- haskell
- SHA1
- Android
Archives
- Today
- Total
프로그래밍 검색 블로그
clojure 함수 3 본문
이걸 C++로 나타내면
1 2 3 4 5 | int fac(int x){ if(x < 1) return 1; else return x * fac(x - 1); } | cs |
return의 생략, 지금까지 생각해왔던 계산식과는 다르게
괄호로 인해 떨어지는 가독성 정도만 제외하면 clojure도 아예 못읽을 정도는 아니다
'clojure기초' 카테고리의 다른 글
clojure 기초 반복 loop (0) | 2017.10.21 |
---|---|
clojure 변수 선언 (0) | 2017.10.21 |
clojure 함수 2 (0) | 2017.10.21 |
clojure 함수1 (0) | 2017.10.21 |
clojure (0) | 2017.10.21 |
Comments