public
Created

  • Download Gist
demo.clj
Clojure
1 2 3 4 5 6 7 8 9
(ns exploring
(:require [clojure.contrib.string :as str]))
(defn a-function [word]
"Capitaliza todas palavras maiores que 2 chars"
(if (>(count word ) 2) (str/capitalize word)))
 
(use '[clojure.contrib.str-utils :only (re-split)])
(filter a-function (re-split #"\W+" "A fine day it is"))

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.