[Openmcl-devel] inverse function
rpgoldman at sift.info
Sat Feb 13 14:22:57 UTC 2010
In its most general form, what you're asking for here, even with your provisos could solve the halting problem, so we need a more restricted spec to get something feasible.
Taoufik Dachraoui <taoufik at mazeboard.com> wrote:
>> (defun square (x)
>> (* x x))
>> (inverse #'square) => #'sqrt ;; or something very like sqrt
>> (funcall (inverse #'square) (square -3)) => 3 ;; i.e., not -3 as it you
>want it to
>I would like an inverse function that returns all possible values
>? (funcall (inverse #'square) 4)
>Many lisp functions are invertable and many are not as in Mathematics.
>What I would like to have is a function to generate an inverse of a given
>(without side-effects) if it has an inverse and the generated inverse
>all possible results (as in sqrt above).
>The inverse generator will fail for many functions with side-effects or
>that do not have an inverse, but will return an inverse function for all
>The generated function, as said above, will return all possibilities.
>Openmcl-devel mailing list
>Openmcl-devel at clozure.com
More information about the Openmcl-devel