Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将如何操作以下 int*string 列表以获取列表中的“字符串”部分作为我的输出?
let item =[ (12,"sausages"); (3,"chips"); (5,"burger"); (19,"cheese"); (24,"milk"); (44,"eggs"); ]
我从 listfilter 开始。有人可以建议如何正确过滤吗?
简单的方法:
item |> List.map snd
item |> List.map (fun (_, y) -> y)