小编AJ *_*del的帖子

将Lisp语法与(operator-integer-operator)格式混淆

我是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 + +)没有意义.上面的语法代表什么?

lisp common-lisp

1
推荐指数
1
解决办法
94
查看次数

app.routes.ts 文件中文件路径上的双星号意味着什么?

我有一个 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)

angular-ui-router angular

-1
推荐指数
1
解决办法
2839
查看次数

标签 统计

angular ×1

angular-ui-router ×1

common-lisp ×1

lisp ×1