The inverse of a function...

Corrado Santoro <>
Mon Mar 8 20:31:21 CET 2004


On Mon, 2004-03-08 at 20:14, Richard Carlsson wrote:
> On Mon, 8 Mar 2004, Corrado Santoro wrote:
> 
> > I have a function like this:
> >
> > f(caesar) -> ...;
> > f(caius) -> ....;
> > f(giulius) -> ....
> >
> > I would like to have a function that, given the name 'f', returns the
> > list [caesar, caius, giulius] (or similar).
> > Is it possibile to do this (obviously without re-interpreting the source
> > file)?
> 
> To be blunt: No. You'll need Prolog to do that sort of thing.
Yes... I know.... I hoped that there were a trick to do a similar thing
on Erlang :-\

-Corrado


-- 
======================================================
Eng. Corrado Santoro, Ph.D.

University of Catania - Engineering Faculty
Department of Computer Science and
Telecommunications Engineering
Viale A. Doria, 6 - 95125 CATANIA (ITALY)

Tel: +39 095 7382364           Fax: +39 095 7382397
     +39 095 7382365
     +39 095 7382380

EMail: 
Personal Home Page:
            http://www.diit.unict.it/users/csanto

NUXI Home Page:
            http://nuxi.iit.unict.it
======================================================





More information about the erlang-questions mailing list