@rocx @cstanhope A great example where the full page is being used to show more content!
Examples from other languages:
PHP: http://php.net/manual/en/function.count.php
Clojure (unofficial): https://clojuredocs.org/clojure.core/count
C++ (admittedly this has two functions): https://en.cppreference.com/w/c/string/byte/strlen
Related Posts
Go has an elegant approach to defining example functions, which are shown in docs as `main()` with the output: https://go.dev/blog/examples
I'm trying to decide what program I should show on the home page of my PL.
Hello World is too simple to show much syntax. Fibonacci is OK but the reader may not know what print(fib(10)) should show.
Maybe print(greet("World")) is better? It gives you a function definition at least.
What are the most popular languages that have used an AST walker for their implementation?
I know Ruby used to do this, but there must be others.
(I'm interested in the lowest PL speed that users will tolerate if you have awesome features.)