7 Jul 2008, 7:17pm

by Layne

leave a comment

Pig Latin implementation in Lisp

Pulled from a Slashdot thread about engineers learning foreign languages:

(define (pigl wd)
(if (vowel? (first wd))
(word wd 'ay)
(pigl (word (bf wd) (first wd)))))

(define (vowel? letter)
(member? letter '(a e i o u)))

Doesn’t actually work, but still amusing nonetheless.

*name

*e-mail

web site

leave a comment