(define (Haiku? x) . . .

23 views
Skip to first unread message

Hen Hanna

unread,
May 15, 2023, 9:07:29 PMMay 15
to

(define (Haiku? x)
(and (= (length (car x)) 5)
(= (length (cadr x)) 7)
(= (length (caddr x)) 5)))


Haiku is defined:
[of length five in first and third;
seven in second].

Hen Hanna

unread,
May 15, 2023, 9:34:41 PMMay 15
to
slightly better , written as:

(define (Haiku? x)
(and
(= (length (car x)) 5)
(= (length (car (cdr x))) (1+ 6) )
Reply all
Reply to author
Forward
0 new messages