foo x = length [x] + _
Run Code Online (Sandbox Code Playgroud)
使用GHC进行编译或加载到GHCi中将给出:
Found hole ‘_’ with type: Int
Relevant bindings include
x :: a
foo :: a -> Int
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
117 次 |
| 最近记录: |