summaryrefslogtreecommitdiff
path: root/antiformatter/src/test.rkt
blob: 57e6367212bc41ed4e2992a2ef4e66cbd8529c2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#lang racket

(define (mangle sexp)
  (if (not (list? sexp)) (error 'mangle "not an s-exp")
    (if (empty? sexp) ""
      (let ((paren (random-paren)))
        (string-append
          (first paren)
          (mangle-params sexp)
          (random-newline)
          (last paren))))))