Re: Euphoria sucks at golfing
- Posted by PeteE May 09, 2014
- 1827 views
mindwalker said...
I don't have Phix or OpenEuphoria installed anywhere these days, but the "i" object isn't needed just put the initial start index value in L[1]. Try the code below to verify it works. (103 characters)
object t=lower(gets(0)),L=1&"llama"for j=2to 6do L[j]=find(L[j],t,L[j-1]) end for?L[2..-not find(0,L)]
The first two 'L's will have the same position, since the find starts at the same position as the last letter found. Also when a letter is not found, the slice length will be negative L[2..0] resulting in an error.

