Functional Grammar is fun (apparently)

Philip Potter philip.g.potter at
Wed Oct 20 12:27:29 BST 2010

On 19 October 2010 17:27, Nick <oinksocket at> wrote:
> There's a growing trend for re-writing "99 Prolog Problems" for other languages.
> Googling for "ninety nine problems X" where X is your language of interest often
> finds something.  e.g.:
> has
some solutions for perl 6.

I'd recommend the arithmetic problems (P31 onwards) or the
miscellaneous problems (P90 onwards) to offer more usefully comparable
solutions between quite widely different languages.

The data-structure-based problems (lists, graphs, trees) have
different meanings and purposes in different languages. This causes
genuine comparison problems for, say, P04 (length of a list) -- in
Perl 5, Perl 6 and Scala standard solutions are "scalar @foo",
"@foo.elems", and "foo.length", but in Prolog, Haskell, Lisp and
friends the point of the exercise is to make an algorithm to manually
count elements in the list, not to just use a builtin to count it for
you; manipulating cons lists is an essential skill in Lispy languages
and requires practice.


More information about the mailing list