Skip to main content
The documentation was not for LispWorks, but Liquid Common Lisp (LCL)
Source Link

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It is the case for LispworksLispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It is the case for Lispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It is the case for Lispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.
deleted 9 characters in body
Source Link
coredump
  • 913
  • 4
  • 15

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It seems to beis the case for Lispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It seems to be the case for Lispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It is the case for Lispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.
Source Link
coredump
  • 913
  • 4
  • 15

The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It seems to be the case for Lispworks. You can write your code so that it works portably with multiple implementations, provided you wrap your declarations as required for each one of them (e.g. #+sbcl). Otherwise, you have to use an iterative approach, which is not hard to implement in your case.

Remarks

The code looks well-formatted, but consider using meaningful names:

  • Write tolerance instead of tol
  • Write line-min (?) or golden-section-search instead of linemin
  • x1, x2, xi1 and xi2 are a little hard to read. Granted, what you write is close to mathematical notations where variable names are short and written with indices, but maybe there are more interesting name to give (low, high?), especially when those names are used as keyword arguments.