[erlang-questions] Sunday puzzle - trying to improve my Erlang
Sun Jul 6 14:17:45 CEST 2008
Toby Thain wrote:
> Hi list,
> I stumbled on this simple 'puzzle' posted some years ago on
> comp.lang.tcl (originally to an Icon mailing list).
> After solving it in Icon and SQL I decided to see what an
> Erlang solution would look like. I'm posting here firstly because
> other people's solutions would be interesting, and also I'd like to
> see how my own solution could be improved.
> Any takers over the weekend? :-)
>  http://groups.google.com/group/comp.lang.tcl/msg/8846d9f7491ba0ba
>  http://telegraphics.com.au/svn/puzzles/trunk/vier-neun/vn.icn
>  http://telegraphics.com.au/svn/puzzles/trunk/vier-neun/Makefile
>  http://telegraphics.com.au/svn/puzzles/trunk/vier-neun/erlang/
Here's my version. Note that it's often better to think in terms of
stages of list processing (mapreduce etc.), instead of inserting and
looking up in dictionaries. I tag each generated pair with the E
element, just to make the list easier to work with later.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the erlang-questions