Created
January 28, 2018 17:34
-
-
Save mtnygard/89cbc73e30e0010ca59adb42536936a2 to your computer and use it in GitHub Desktop.
Quick bit of fun inspired by https://twitter.com/georgeb3dr/status/956944389456236544
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require '[clojure.string :as str]) | |
| (def icao | |
| (->> (str/split | |
| "Alfa, Bravo, Charlie, Delta, Echo, Foxtrot, Golf, Hotel, India, Juliett, Kilo, Lima, Mike, November, Oscar, Papa, Quebec, Romeo, Sierra, Tango, Uniform, Victor, Whiskey, X-ray, Yankee, Zulu" | |
| #", ") | |
| (map #(hash-map (first %) %)) | |
| (apply merge))) | |
| (defn radiocode [s] | |
| (str/join | |
| " " | |
| (keep identity | |
| (map icao (str/upper-case s))))) | |
| (radiocode "If you can read this") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
could be ever so slightly shorter :)