【发布时间】:2023-03-22 04:33:02
【问题描述】:
我有一个([(Int, Int, Int)], Int, Int) 形式的值
我需要一个以([(Int, Int, Int)], Int, Int) 形式获取数据并返回[[(Int, Int, Int)]] 的函数
假设我的列表名为it。
当我运行fst it
我收到此错误
* Couldn't match expected type `(a, b0)'
with actual type `([(Int, Int, Int)], Int, Int)'
* In the first argument of `fst', namely `it'
In the expression: fst it
In an equation for `it': it = fst it
* Relevant bindings include it :: a (bound at <interactive>:9:1)
我无法理解我做错了什么。有人可以帮我吗。我想获取it 的第一个值,它是一个列表。
【问题讨论】:
标签: haskell functional-programming