Reducing golfed redundancy For the "First they came" golfing challenge, I wrote the following:

(defn ftc []
  ; Loop over the lines numbers for reference
  (doseq [i (range 4)
          :let [; Added a dummy last "class" since "me-" wasn't necessary,
                ;  and only having 3 elements was causing OOB errors.
                classes ["Socialist" "Trade Unionist" "Jew" ""]

                ; A helper function that executes either its first or second argument
                ;  depending on if the current line is one of the first 3 lines.
                if-first-three-lines #(if (&lt; i 3) % %2)]]

    ; An implicit space is inserted between each of the args to println
    (println
      ; Decide on the opener
      (if (= i 0) "First" "Then")

      "they came for"

      ; Start string concatenation because the implicit space
      ;  begins complicating things.
      (str
        ; Decide which "class" the line belongs to
        (if-first-three-lines
          (str "the " (classes i) "s, ")
          "me-")

        ; Decide on the line ending
        (if-first-three-lines
          "and I did not speak out-\n"
          "and there was no one left to speak for me.")

        ; Then pick the trailer
        (if-first-three-lines
          (str "Because I was not a " (classes i) ".\n")
          "")))))


I generally like how it turned out, but I have a problem with it: the redundancy of the use of the if-first-three-lines function. I've racked my brain to think of a way to simplify it, but haven't been able to figure out a way that doesn't add to the byte count. I call the same function 3 times in a row inside an argument list, just with different arguments. I thought of juxtaposing a application of the arguments, but it was still too long.

The code generally turned out well, but I'm open to any recommendations; whether related to golfing or not.



Keep in mind I minimized the code before submitting. I'm looking for language-specific related golfing tips.
I agree with you that the if-first-three-lines predicate is not needed. I like Massa's solution, https://codegolf.stackexchange.com/questions/139900/first-they-came/140247#140204 :

print(' they came for '.join(
    ["First"]
    + [f"the {i}s, and I did not speak out-\nBecause I was not a {i}.\n\nThen"
       for i in ['Socialist', 'Trade Unionist', 'Jew']]
    + ['me-and there was no one left to speak for me.']))


It says everything additively, without subtracting any special cases. Perhaps you'd like to port that approach.