Last active
May 12, 2018 08:11
-
-
Save lagenorhynque/d17090f8c4805088e4a88c40a0c6bc45 to your computer and use it in GitHub Desktop.
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
| (defn english->french [words] | |
| (clojure.walk/postwalk-replace '{are vas | |
| book livre | |
| friend ami | |
| hello bonjour | |
| how comment | |
| my mon | |
| red rouge | |
| you tu | |
| today aujourd'hui} | |
| words)) | |
| (english->french '(hello my friend - how are you today ?)) | |
| ;; => (bonjour mon ami - comment vas tu aujourd'hui ?) |
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
| (defun english->french (words) | |
| (sublis '((are . va) (book . libre) (friend . ami) | |
| (hello . bonjour) (how . comment) (my . mon) | |
| (red . rouge) (you. tu)) | |
| words)) | |
| (english->french '(hello my friend - how are you today?)) | |
| ;; => (BONJOUR MON AMI - COMMENT VA TU TODAY?) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment