[Openmcl-devel] inverse function
taoufik at mazeboard.com
Sat Feb 13 13:10:02 UTC 2010
> (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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel