Thanks. I initially tried as below with first pattern [empty empty] and
empty apparently is a variable that will match a non-empty list. I need to
use '*()*
(define (words-on-line llos)
(match llos
[*empty* empty]
[(list a b ...) ))
On Friday, 6 March 2020 04:01:46 UTC+7, Daniel
Hint:
(define (words-on-line llos)
(match llos
['() empty]
[(list a b ...) ))
Dan
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+un
Hey Guys,
I do not see how to apply pattern matching to this problem.
Using for/list as below makes the most sense to me and I do not see how to
fit in pattern matching
; [List-of [List-of String]] -> [List-of Natural]
; produces list of number of Strings per item in a llos
(check-expect (words
3 matches
Mail list logo