On Thu, 28 Jan 2016 16:30:57 -0600,
Brian Adkins wrote:
>
> I'm sure this is a really bad idea, but I couldn't resist after finding
> section 3.3.8 in the Dr. Racket documentation - what fun :)
>
> (define (∃ member list)
> (cond [ (∅? list) ∅ ]
> [ (≡ member (α list)) list ]
>
I'm sure this is a really bad idea, but I couldn't resist after finding section
3.3.8 in the Dr. Racket documentation - what fun :)
(define (∃ member list)
(cond [ (∅? list) ∅ ]
[ (≡ member (α list)) list ]
[ else (∃ member (ω list)) ]))
(∃ 8 '(3 9 8 5))
Using "alpha" for "car
2 matches
Mail list logo