1
dashboard.Grid
|> Seq.mapi ^-^ fun y sx ->
sx |> Seq.mapi ^-^ fun x s ->
if not <| s.IsEmpty && s.CellState.Color = color then
let psteps = s.CellState.motion(dashboard, new SPosition(x,y), color)
if psteps <> null then
if psteps.IsEmpty then
Some(psteps)
else
None
else None
else None
|> Seq.choose id
|> Seq.collect(fun x -> x)
|> Seq.collect(fun x -> x)
所以,我只是事情该序列的最后一部分(2串)是怪异。我可以另一种方式打开序列吗? List.ofSeq()在这里不起作用。如何打开SEQ <seq<...>>或另一种方式使Seq.collect(有趣X - > X)
谢谢。