RosettaCodeData/Task/Search-a-list/Racket/search-a-list-2.rkt
2023-07-01 13:44:08 -04:00

4 lines
105 B
Racket

(define (index-last xs y)
(for/last ([(x i) (in-indexed xs)]
#:when (equal? x y))
i))