Files
ProgrammingLanguages/recursion/leapyear.lisp
T
2023-04-12 13:20:35 -06:00

17 lines
409 B
Common Lisp

#lang racket/base
(define (isleap year)
(cond
((zero? (modulo year 400)) #T)
((zero? (modulo year 100)) #F)
(else (zero? (modulo year 4))#T)
))
(define (is_in_there item list)
(cond
[(null? list) #F]
[(= (car list) item) #T]
[else (is_in_there item (cdr list))]
)
)
(is_in_there 5 '(5))