Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
18
Task/Ordered-words/Lasso/ordered-words.lasso
Normal file
18
Task/Ordered-words/Lasso/ordered-words.lasso
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
local(f = file('unixdict.txt'), words = array, ordered = array, maxleng = 0)
|
||||
#f->dowithclose => {
|
||||
#f->foreachLine => {
|
||||
#words->insert(#1)
|
||||
}
|
||||
}
|
||||
with w in #words
|
||||
do => {
|
||||
local(tosort = #w->asString->values)
|
||||
#tosort->sort
|
||||
if(#w->asString == #tosort->join('')) => {
|
||||
#ordered->insert(#w->asString)
|
||||
#w->asString->size > #maxleng ? #maxleng = #w->asString->size
|
||||
}
|
||||
}
|
||||
with w in #ordered
|
||||
where #w->size == #maxleng
|
||||
do => {^ #w + '\r' ^}
|
||||
Loading…
Add table
Add a link
Reference in a new issue