Re: Programming Golf attempt - Pig Latin

2012-11-05 Thread hak
you might submit this problem on 4clojure i think you need regex for a short solution, something like (*fn* [s] (clojure.string/join " " (map #(*let* [[_ c r] (re-find #"([^aeiouAEIOU]*)(\w*)" %)] (str r "-" c (*if* (empty? c) \w)"ay"))( clojure.string/split s #"\s" Am Mittwoch, 31. Okt

Programming Golf attempt - Pig Latin

2012-10-31 Thread Sean S
Best I did wa*s *376 characters and that's with minifying*. *** http://codegolf.stackexchange.com/questions/8797/ode-cay-olf-gay/8856#8856 Basically if the word starts with a vowel postfix "-ay" If it doesn't have any vowels postfix "ay" Otherwise take the first letter postfix "-" first letter "