Jump to content

Word wheel: Difference between revisions

m
→‎{{header|Factor}}: remove unused vocabularies
(→‎{{header|Raku}}: Add a Raku example)
m (→‎{{header|Factor}}: remove unused vocabularies)
Line 134:
=={{header|Factor}}==
{{works with|Factor|0.99 2020-07-03}}
<lang factor>USING: assocs assocsio.extrasencodings.ascii combinatorsio.short-circuitfiles kernel groupingmath
math.statistics prettyprint sequences sets sorting ;
io.encodings.ascii io.files kernel math math.statistics
prettyprint sequences sets sorting ;
 
! Only consider words longer than two letters and words that
Line 143 ⟶ 142:
[ [ member? ] keep length 2 > and ] with filter ;
 
: words ( input-str path -- wordsseq )
[ [ midpoint@ ] keep nth ] [ ascii file-lines pare ] bi* ;
 
1,827

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.