Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

(define (Haiku? x) . . .

26 views
Skip to first unread message

Hen Hanna

unread,
May 15, 2023, 9:07:29 PM5/15/23
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 PM5/15/23
to
slightly better , written as:

(define (Haiku? x)
(and
(= (length (car x)) 5)
(= (length (car (cdr x))) (1+ 6) )
0 new messages