Word wheel: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Raku}}: Add a Raku example) |
m (→{{header|Factor}}: remove unused vocabularies) |
||
Line 134: | Line 134: | ||
=={{header|Factor}}== |
=={{header|Factor}}== |
||
{{works with|Factor|0.99 2020-07-03}} |
{{works with|Factor|0.99 2020-07-03}} |
||
<lang factor>USING: assocs |
<lang factor>USING: assocs io.encodings.ascii io.files kernel math |
||
⚫ | |||
io.encodings.ascii io.files kernel math math.statistics |
|||
⚫ | |||
! Only consider words longer than two letters and words that |
! Only consider words longer than two letters and words that |
||
Line 143: | Line 142: | ||
[ [ member? ] keep length 2 > and ] with filter ; |
[ [ member? ] keep length 2 > and ] with filter ; |
||
: words ( input-str path -- |
: words ( input-str path -- seq ) |
||
[ [ midpoint@ ] keep nth ] [ ascii file-lines pare ] bi* ; |
[ [ midpoint@ ] keep nth ] [ ascii file-lines pare ] bi* ; |
||