Jump to content

ABC words: Difference between revisions

m
→‎{{header|Raku}}: More generic display code
(Added Arturo implementation)
m (→‎{{header|Raku}}: More generic display code)
Line 1,398:
 
=={{header|Raku}}==
<lang perl6>put display 'unixdict.txt'.IO.words».fc.grep({ (.index('a')//next) < (.index('b')//next) < (.index('c')//next) })\,
.&{"{+$_} words:\n11cols, " ~ .batch(11)».:fmt('%-12s').join: "\n "};</lang>
 
sub display ($list, :$cols = 10, :$fmt = '%6d', :$title = "{+$list} matching:\n" ) {
cache $list;
$title ~ $list.batch($cols)».fmt($fmt).join: "\n"
}</lang>
{{out}}
<pre>55 wordsmatching:
aback abacus abc abdicate abduct abeyance abject abreact abscess abscissa abscissae
absence abstract abstracter abstractor adiabatic aerobacter aerobic albacore alberich albrecht algebraic
alphabetic ambiance ambuscade aminobenzoic anaerobic arabic athabascan auerbach diabetic diabolic drawback
fabric fabricate flashback halfback iambic lampblack leatherback metabolic nabisco paperback parabolic
playback prefabricate quarterback razorback roadblock sabbatical snapback strabismic syllabic tabernacle tablecloth </pre>
 
=={{header|REXX}}==
10,333

edits

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