YAPC::EU 2018 Glasgow Update!

This commit is contained in:
Ingy döt Net 2018-08-17 15:15:24 +01:00
parent 22f33d4004
commit 4e2d22a71d
1170 changed files with 15042 additions and 3047 deletions

View file

@ -5,15 +5,13 @@ list$ = LOAD$("unixdict.txt")
FOR word$ IN list$ STEP NL$
SPLIT word$ BY 1 TO letter$ SIZE length
SORT letter$ SIZE length
JOIN letter$ BY "" TO term$ SIZE length
term$ = EXTRACT$(SORT$(EXPLODE$(word$, 1)), " ")
IF word$ = term$ THEN
IF length > MaxLen THEN
MaxLen = length
IF LEN(term$) > MaxLen THEN
MaxLen = LEN(term$)
result$ = word$
ELIF length = MaxLen THEN
ELIF LEN(term$) = MaxLen THEN
result$ = APPEND$(result$, 0, word$, NL$)
END IF
END IF