Re: Euphoria sucks at golfing
- Posted by gbonvehi May 07, 2014
- 1631 views
Well, it's more descriptive than others. If the include makes up the count, you could compare in uppercase by transforming the input with
t=and_bits(gets(0),#DF)
And here's my entry without much thinking on how to remove the duplicate if
object t=and_bits(gets(0),#DF),s="LLAMA",z=1,r={} for i=1 to length(t) do if t[i]=s[z] then r&=i z+=1 if z=6 then exit end if end if end for if z<6 then r={} end if ?r
Edit: removed unused var
object t=and_bits(gets(0),#DF),s="LLAMA",z=1,r={} for i=1 to length(t) do if and_bits(t[i]=s[z],z<6) then r&=i z+=1 end if end for if z<6 then r={} end if ?r
Edit2: one if removed :)