            (str (string/trim (get-in word '(:a)))
                 " "
                 (string/trim (get-in word '(:b :français))))
-           
+
            (and
             (string? (get-in word '(:a :français)))
             (get-in word '(:a :français))

        ;; (elle) la + est (amuseé) = (elle) l'est (amuseé)
        (and (not (nil? b))
             (let [a (get-string word)
                   b (get-string b)]
               (and (re-find #"^(la|le|me|se|te)$" a) ;;
                    (re-find #"^[aeéiou]" b))))
        (let [a (get-string word)]

  "Conjugate an infinitive into a surface form by taking the first 
   element of replace-patterns where the element's :u unifies successfully with
   unify-with."
  (let [result
        (take 1
              (remove #(nil? %)
                      (map
                       (fn [replace-pattern]
                         (let [from (nth (:g replace-pattern) 0)
                               to (nth (:g replace-pattern) 1)
                               unify-against (if (:u replace-pattern)
                                               (:u replace-pattern)
                                               :top)]
                            (if (and from to
                                     (re-matches from infinitive)
                                     (not (fail? (unifyc unify-against
                                                         unify-with))))
                              (do
                                (log/debug (str "matched infinitive: " infinitive))
                                (log/debug (str "from: " from))
                                (log/debug (str "to: " to))
                                (log/debug (str "input spec: " (strip-refs unify-with)))
                                (log/debug (str "pattern spec:"  (strip-refs unify-against)))
                                (string/replace infinitive from to)))))
                        replace-patterns)))]
    (if (empty? result)
      (throw (Exception. (str "nothing found to match infinitive: " infinitive " ; "
                              " unify-with: " unify-with ".")))

      (first result))))

;; TODO: separate part-of-speech -related functionality (e.g. the word is a verb) from
;; compositional functionality (e.g. the word has an :a and :b, so combine by concatenation, etc)
