Lisp and Haskell (2015)
Just tried the code in SBCL and it definitely gives a compiler warning even without executing the function:<p><pre><code>    This is SBCL 1.5.6, an implementation of ANSI Common Lisp.
    More information about SBCL is available at &lt;http:&#x2F;&#x2F;www.sbcl.org&#x2F;&gt;.
    
    SBCL is free software, provided as is, with absolutely no warranty.
    It is mostly in the public domain; some portions are provided under
    BSD-style licenses.  See the CREDITS and COPYING files in the
    distribution for more information.
    * (defun add-text-padding (str &amp;key padding newline)
      &quot;Add padding to text STR. Every line except for the first one, will be
    prefixed with PADDING spaces. If NEWLINE is non-NIL, newline character will
    be prepended to the text making it start on the next line with padding
    applied to every single line.&quot;
      (let ((str (if newline
                     (concatenate &#x27;string (string #\Newline) str)
                     str)))
        (with-output-to-string (s)
          (map &#x27;string
               (lambda (x)
                 (princ x s)
                 (when (char= x #\Newline)
                   (dotimes (i padding)
                     (princ #\Space s))))
               str))))
    ; in: DEFUN ADD-TEXT-PADDING
    ;     (MAP &#x27;STRING
    ;          (LAMBDA (X)
    ;            (PRINC X S)
    ;            (WHEN (CHAR= X #\Newline) (DOTIMES (I PADDING) (PRINC #\  S))))
    ;          STR)
    ; 
    ; caught WARNING:
    ;   The function (LAMBDA (X) :IN ADD-TEXT-PADDING) called by MAP returns NULL but CHARACTER is expected
    ;   See also:
    ;     The SBCL Manual, Node &quot;Handling of Types&quot;
    ; 
    ; compilation unit finished
    ;   caught 1 WARNING condition
    ADD-TEXT-PADDING</code></pre>