"Try it now"

bearophile bearophileHUGS at lycos.com
Sun Apr 17 12:00:26 PDT 2011


Adam D. Ruppe:

> new version of javascript up:
> http://arsdnet.net/d-web-site/std_algorithm2.html

I suggest to add a spinning circle for the compilation wait (see Ideone site too).

Some comments on the code examples:
- The second example for reduce(), the example of group() and minCount(), the third example of remove() need tuple
- The example of uninitializedFill, initializeAll and schwartzSort contain dummy ... code
- The filter() example gives Error: incompatible types caused by:
auto small = filter!("a < 3")(arr);
assert(small == [ 1, 2 ]);
- Splitter() example gives another Error: incompatible types
- the first and second examples of find() gives a import conflict error
- The third find() example doesn't find tuple and gives a missing overload error
- The example of endsWith() gives algorithm.d(3127): Error: no property 'empty' for type 'char'
- findAdjacent() lacks an auto p = ...
- balancedParens() gives an assert error
- The example of equal() gives a approxEqual error and more
- levenshteinDistance() gives Error: static assert  "Bad binary function q{toupper(a) == toupper(b)}. You need to use a valid D expression using symbols a of type dchar and b of type dchar."
- levenshteinDistanceAndPath() gives a algorithm.d(3975): Error: undefined identifier Range, did you mean alias Range1?
- The window formatting of bringToFront() seems wrong
- The second and third bringToFront() examples lack SList
- The 4th and 5th examples of remove() give an assert error
- The topN() example doesn't find "less"
- completeSort() gives some problems, maybe it can't find assumeSorted()
- makeIndex() example gives a template error
- topNCopy() example gives an error, maybe it's wrong
- setIntersection() example asserts statically
- largestPartialIntersection() and largestPartialIntersectionWeighted() can't find Tuple

Thank you for reminding me how hugely useful is the Python doctests module :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list