Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

flet

flet( 
l_bindings 
[g_body] 
) 
=> g_result

Description

Enables you to define local functions with LET semantics.

The names of functions defined by flet retain their local definitions only within the body of flet. Also, the function definition bindings are visible only in the body of flet. This helps in defining a local version of function which in turn calls the global version of the function with the same name but with different arguments.

flet can only be used in Scheme mode.

Arguments

l_bindings

A list of variables or a list of the form (s_variable g_value).

g_body

A sequence of one or more expressions.

Value Returned

g_result

Result of evaluation.

Examples

(flet ((foo (x) (list x)))(foo 1))
=> (1)

Related Topics

Function and Program Structure


Return to top
 ⠀
X