Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 275 Bytes
USING: ascii kernel math sequences ;
IN: pig-latin
: vowel? ( ch -- ? ) ch>lower "aeiou" member? ;
: pig-latin ( str -- str' )
dup [ vowel? ] find [
[
"way" append
] [
cut swap "ay" 3append
] if-zero
] [ drop ] if ;