strange?

Vlad Dumitrescu XX (LN/EAB) <>
Fri Nov 18 11:18:25 CET 2005


Cool! 

This makes a good case for promoting modules to first-class citizens.
Having to track atoms is bad enough, now they can be
abstract/parametrized too! :-) 

/Vlad


> -----Original Message-----
> From:  
> [mailto:] On Behalf Of 
> Sent: Friday, November 18, 2005 10:43 AM
> To: 
> Subject: strange?
> 
> Here's a late submission to the obfuscation contest.
> 
> Look at the code.  Try to figure out what a:c() returns.  Run 
> it on the latest erlang.
> 
> 
> -module(a).
> -compile(export_all).
> 
> c() ->
>     M = {a, b},
>     M:k(a).
> 
> b(k, a) ->
>      wow.
> 
> k(A, T) ->
>     element(2, T).
> 
> 
> 
> /martin
> 



More information about the erlang-questions mailing list