以下のコードでエラーメッセージが表示されます。それは単なる構文エラーですが、初心者としては何が間違っているのか分かりません。誰か知ってる?基本ラケット構文エラー:アプリケーションがプロシージャではありません
(define qsort
(lambda (input-list)
(define sort-pivot-iter
(lambda (input-list pivot acc)
(let ([current (first input-list)]
[pivot-less (first acc)]
[pivot-greater-equal (first (rest acc))])
(cond (
[(empty? input-list) acc]
[(< current pivot) (sort-pivot-iter (rest input-list) pivot
'((cons current pivot-less) pivot-greater-equal))]
[(>= current pivot) (sort-pivot-iter (rest input-list) pivot
'(pivot-less (cons current pivot-greater-equal)))])))))
(let* ([pivot (first input-list)]
[pivot-sorted (sort-pivot-iter
(rest input-list) pivot (list empty empty))]
[left (first pivot-sorted)]
[right (first (rest pivot-sorted))])
(cond
[(< (length input-list) 2) input-list]
[else (append (qsort left) '(pivot) (qsort right))]))))
(qsort '(2 3 1))