fc [Macro]


The fc macro performs an exhaustive search for the concept having a specified name. It should be used interactively rather than in application code because it is much slower than get-concept or find-concept.


fc datum &key context


The datum argument is a Lisp expression. It may be an extended identifier having the form context\^{\space}name, where context is the context from which the search starts. It may also be an identifier beginning and/or ending with the wildcard character *, in which case the search proceeds until the first matching concept is found. It is not necessary to specify the package in which datum resides since the search is package-independent. If datum is a symbol, Loom first tries to locate the concept identified by that symbol. If this fails, or if datum is a list, Loom evaluates datum and searches for the concept corresponding to the resulting value.

The context argument is the name of a context, or a form which evaluates to a context or context name. This argument defaults to the current context.


Two values are returned: (1) the concept having the specified name, or nil if none was found, (2) the context in which the concept was found, or nil if no concept was found.


This is the most thorough and flexible of the functions for locating Loom concepts, but it is also the slowest. Because datum may be evaluated at compile time, fc cannot be reliably used in application code.


(fc Thing) ==> |C|THING |TH|BUILT-IN-THEORY 
(fc cl-user-theory\^{\space}Binary-Search) ==> |C|BINARY-SEARCH |TH|CL-USER-THEORY  
(fc *-Search :context bottom-theory) ==> |C|BINARY-SEARCH |TH|CL-USER-THEORY 
(setq concepts '(Man Woman))    
(fc (first concepts)) ==> |C|MAN |TH|CL-USER-THEORY

See Also

Last modified: Jun 1 1995