我是lisp的新手,我对这个LISP语法有疑问:
(defparameter *binary-operators*
'((+ 1 +) (- 1 -) (* 2 *)
(x 2 *) (/ 2 %) (^ 3 expt)))
Run Code Online (Sandbox Code Playgroud)
根据我的理解,defparameter允许重新分配二元运算符变量,但我对如何评估(+ 1 +),( - 1 - )...感到困惑.我知道在LISP中(+ 4 6)会导致(4 + 6)= 10但是相同的逻辑会导致(1 + +)没有意义.上面的语法代表什么?
我有一个 app.routes.ts 文件,其中有一个名为 appRoutes 的数组。我的数组结构是这样的:
const appRoutes: Routes = [
...
{
path: 'example/:example1/:example2',
loadChildren: () => import('./example/example.module').then(m => m.Example),
resolve: {
example: ExampleResolver
},
data: {
title: 'Example'
},
canActivate: [ ValidateExample ]
},
...
{
path: '**', redirectTo: '/home',
}
Run Code Online (Sandbox Code Playgroud)
其中 appRoutes 数组中的最后一个对象是
path: '**', redirectTo: '/home'
Run Code Online (Sandbox Code Playgroud)
在这种情况下,双星号意味着什么以及它与
redirectTo: '/home'
Run Code Online (Sandbox Code Playgroud)