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
- web
- program
- async
- c++
- SHA1
- Chrono
- type_traits
- Functional
- Scala
- RAII
- AES
- WebView
- traits
- coroutines
- sprintf
- haskell
- ranges
- Clojure
- go
- stringprintf
- kotlin
- ChromeTab
- sha256
- template
- Observer
- CustomTab
- design pattern
- Android
- Reflect
- SHA512
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