exported variables (was: RE: How to make GS Widgets)
Ulf Wiger
ulf.wiger@REDACTED
Sun Apr 18 00:33:36 CEST 2004
On Sat, 17 Apr 2004 23:52:28 +0200, Tony Rogvall <tony@REDACTED> wrote:
> Why add an extra "named" function ? Why not ?
>
> validate_colors({R, G, B}) ->
> VC = fun(C) -> when C>=0, C=<255 -> C end,
> {VC(R), VC(G), VC(B)}.
...because I decided ten seconds after hitting "send" that
that was indeed the better solution. (:
My first thought was that crash reports would be clearer with
a separate function, but there's no significant difference.
/Uffe
--
Ulf Wiger
More information about the erlang-questions
mailing list