mirror of
https://github.com/RustyRaptor/ProgrammingLanguages.git
synced 2026-12-03 21:55:15 -07:00
lisp 1
This commit is contained in:
1 parent
56de41b434
commit
9375c88239
1 file changed
+17
@@ -0,0 +1,17 @@
|
||||
#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))
|
||||
Reference in new issue
Block a user