X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=blobdiff_plain;f=extra%2Frosetta-code%2Fanagrams-deranged%2Fanagrams-deranged.factor;fp=extra%2Frosetta-code%2Fanagrams-deranged%2Fanagrams-deranged.factor;h=d65f06a8a99c0d0d4f41317989c169c9200163c2;hp=284e85c4c64b575a9b566962d58a78bab9d64a9e;hb=e20bf9b97fe60ebe18b8972b2b56fe681fce64a8;hpb=db559f6f98522594be8ef9a9392fb6d95fab3abe diff --git a/extra/rosetta-code/anagrams-deranged/anagrams-deranged.factor b/extra/rosetta-code/anagrams-deranged/anagrams-deranged.factor index 284e85c4c6..d65f06a8a9 100644 --- a/extra/rosetta-code/anagrams-deranged/anagrams-deranged.factor +++ b/extra/rosetta-code/anagrams-deranged/anagrams-deranged.factor @@ -1,6 +1,6 @@ ! Copyright (c) 2012 Anonymous ! See https://factorcode.org/license.txt for BSD license. -USING: assocs http.client io.encodings.utf8 io.files +USING: assocs http.download io.encodings.utf8 io.files io.files.temp kernel math math.combinatorics sequences sorting strings urls ; @@ -15,8 +15,8 @@ IN: rosettacode.anagrams-deranged ! in the same position in both words. ! The task is to use the word list at -! https://www.puzzlers.org/pub/wordlists/unixdict.txt to find and -! show the longest deranged anagram. +! https://raw.githubusercontent.com/quinnj/Rosetta-Julia/master/unixdict.txt +! to find and show show the longest deranged anagram. : derangement? ( str1 str2 -- ? ) [ = not ] 2all? ; @@ -41,8 +41,8 @@ IN: rosettacode.anagrams-deranged deranged-anagrams [ first length ] sort-by last ; : default-word-list ( -- path ) - URL" https://puzzlers.org/pub/wordlists/unixdict.txt" - "unixdict.txt" temp-file [ ?download-to ] keep ; + URL" https://raw.githubusercontent.com/quinnj/Rosetta-Julia/master/unixdict.txt" + "unixdict.txt" temp-file download-to ; : longest-deranged-anagrams ( -- anagrams ) default-word-list (longest-deranged-anagrams) ;