Rosetta Code/Count examples: Difference between revisions

Added Bracmat example
(Added Bracmat example)
Line 260:
 
Total: 27004 examples.
</pre>
 
=={{header|Bracmat}}==
<lang bracmat>( ( get-page
=
. sys$(str$("wget -q -O wget.out \"" !arg \"))
& get$("wget.out",HT ML)
)
& get-page$"http://rosettacode.org/wiki/Category:Programming_Tasks"
: ? (table.?) ?tasklist (.table.) ?
& 0:?list
& whl
' ( !tasklist
: ?
( a
. (href.@(?:"/wiki/" ?href)) (title.?title)
& get-page$(str$("http://rosettacode.org/wiki/" !href))
: ?task
& 0:?cnt
& whl
' ( !task
: ?
( (span.(class.mw-headline) (id.?))
?span
(.span.)
?task
& !span
: ?
( a
. (href.@(?:"/wiki/Category:" ?))
(title.@(?:"Category:" ?))
)
@
(.a.)
?
)
& 1+!cnt:?cnt
)
& (!cnt.!title)+!list:?list
)
?tasklist
)
& lst$(list,taskfreq,NEW)
)</lang>
Output (in file <code>tasqfreq</code>):
<pre>list=
(2."OLE Automation")
+ (3."Canny edge detector")
+ ( 3
. "Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N1, Contined Fraction N2)"
)
+ (4."Colour pinstripe/Printer")
+ (4."Vogel's approximation method")
+ (5."Catmull–Clark subdivision surface")
+ (5."Percolation/Bond percolation")
+ (5.Pinstripe/Printer)
+ (5."Zeckendorf arithmetic")
+ (6."Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N)")
+ (6."Percolation/Mean cluster density")
+ (7."Bitmap/PPM conversion through a pipe")
+ (7."Deconvolution/2D+")
+ (7."K-d tree")
....
+ (125."Greatest element of a list")
+ (127."Averages/Arithmetic mean")
+ (131.Arrays)
+ (131."Increment a numerical string")
+ (132."Greatest common divisor")
+ (133.Loops/While)
+ (134."Conditional structures")
+ (136.Arithmetic/Integer)
+ (137.Loops/For)
+ (145.Loops/Infinite)
+ (147."Ackermann function")
+ (148."Reverse a string")
+ (152."A+B")
+ (152."Function definition")
+ (160."Empty program")
+ (163."Fibonacci sequence")
+ (164.Factorial)
+ (182.FizzBuzz)
+ (187."100 doors")
+ (188.Comments)
+ (216."99 Bottles of Beer")
+ (269."Hello world/Text");
</pre>
 
483

edits