Clojure-strings-reverse
提供:Dev Guides
Clojure-文字列の逆
文字列内の文字を反転します。
構文
構文は次のとおりです。
(reverse str)
パラメータ-「str」は逆にする必要がある文字列です。
戻り値-逆の文字列。
例
以下は、Clojureのリバースの例です。
(ns clojure.examples.hello
(:gen-class))
(defn hello-world []
(println (reverse "Hello World")))
(hello-world)
出力
上記のプログラムは、次の出力を生成します。
(d l r o W o l l e H)