Closed akocur closed 8 months ago
For example,
#lang sicp (#%require rackunit) (define (cons x y) (lambda (f) (f x y))) (define (car z) (z (lambda (p q) p))) (define (cdr z) (z (lambda (p q) q))) (check-equal? (car (cons 2 3)) 2) (check-equal? (cdr (cons 2 3)) 3)
linter tells me:
example.rkt:6:31:warning:identifier 'q' is never used example.rkt:7:29:warning:identifier 'p' is never used
However, q and p are needed when calling cons
There’s currently no way to disable warnings per line, but you can avoid unused variable warnings by naming unused variables _ or by prefixing them with _.
_
For example,
linter tells me:
example.rkt:6:31:warning:identifier 'q' is never used example.rkt:7:29:warning:identifier 'p' is never used
However, q and p are needed when calling cons