Skip to main content
Should have been obvious that the line break wasn't needed.
Source Link
user1011
user1011

Haskell (9898 96 chars)

g x y@(t:r)(z:w)|x==y="Yes"
 |1>0=g|x==y="Yes"|1>0=g x(r++[t])w
g _ _[]="No"
f(x:y:_)=g x y y
main=interact$f.words

Haskell (98 chars)

g x y@(t:r)(z:w)|x==y="Yes"
 |1>0=g x(r++[t])w
g _ _[]="No"
f(x:y:_)=g x y y
main=interact$f.words

Haskell (98 96 chars)

g x y@(t:r)(z:w)|x==y="Yes"|1>0=g x(r++[t])w
g _ _[]="No"
f(x:y:_)=g x y y
main=interact$f.words
Source Link
user1011
user1011

Haskell (98 chars)

g x y@(t:r)(z:w)|x==y="Yes"
 |1>0=g x(r++[t])w
g _ _[]="No"
f(x:y:_)=g x y y
main=interact$f.words