Community Page
- phildawes.net/blog/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Hi, Do you feel that your agility in Factor has improved since this post? Roger
- Thanks for the pointer - I've cleaned up the spam and regrettably added some moderation
- I'm loving the comments thread for this post. Can't decide whether to get my upholstery cleaned or do something about my fast food obesity.
- Cool - thanks Eric
- I pasted some code that does the moving sum in factor. http://paste.factorcode.org/paste?id=569#282
Jump to original thread »
A little utility I wrote for clearing up code: words-not-used. You give it a word and a vocabulary and it tells you all the definitions in the vocab that aren’t used by the execution of the word. It’s handy for clearing up old code that is no longer used.
(n.b. the word ... Continue reading »
(n.b. the word ... Continue reading »
1 year ago
To get all words used by a word, recursively, use
[ word-def quot-uses ] closure
Also words list>hashtable is just vocab-words
And list>hashtable can be written as
: list>hashtable [ "" ] H{ } map>assoc ;
Assuming you want "" as the values, but usually we use equal keys/values when representing a set as a hashtable:
: list>hashtable [ dup ] H{ } map>assoc ;