partial functions added
This commit is contained in:
		
							
								
								
									
										9
									
								
								src/koans/about_partial_functions.clj
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/koans/about_partial_functions.clj
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| (meditations | ||||
|   "Partial functions allow procrastination" | ||||
|   (= 20 (let [multiply-by-5 (partial * 5)] | ||||
|           (___ __))) | ||||
|  | ||||
|   "Don't forget: first things first" | ||||
|   (= [__ __ __ __] | ||||
|      (let [ab-adder (partial concat [:a :b])] | ||||
|        (ab-adder [__ __])))) | ||||
| @@ -22,6 +22,7 @@ | ||||
|       "about_conditionals" | ||||
|       "about_higher_order_functions" | ||||
|       "about_runtime_polymorphism" | ||||
|       "about_sequence_comprehensions") | ||||
|       "about_sequence_comprehensions" | ||||
|       "about_partial_functions") | ||||
|  | ||||
| (println "You have achieved clojure enlightenment. Namaste.") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user