if/do
if(condition) ( statement #1 statement #1.1 ) ( statement #2 statement #2.1 )
Example
(ns clojure.examples.hello (:gen-class)) ;; This program displays Hello World (defn Example [] ( if (= 2 2) (do(println "Both the values are equal") (println "true")) (do(println "Both the values are not equal") (println "false")))) (Example)
Output
Both the values are equal true
Refs
관련 문서
Plugin Backlinks: 아무 것도 없습니다.