Fsharp: Any bug in QueueList?

Created on 13 Apr 2018  路  7Comments  路  Source: dotnet/fsharp

https://github.com/Microsoft/visualfsharp/blob/5daaf8294ab0adcf1a19a77935966e5b3a30c32e/src/fsharp/QueueList.fs#L37
``` F#
member x.Append(ys:seq<_>) = QueueList(firstElements, (List.rev (Seq.toList ys) @ lastElementsRev), numLastElements+Seq.length ys))


counterexamples:
``` F#
let headQueue = ofSeq [1..5]
let tailQueue = ofSeq [1..100000]
let temp = append headQueue tailQueue
temp.ToList() |>ignore // call List.rev inside
temp.ToList() |> ignore // call List.rev again
Area-Compiler Severity-Low bug

Most helpful comment

mhm looks like I fixed another issue. It still does 2 reverse operations.

All 7 comments

miss understand, this is not a bug.
please close this issues.
sorry

@zhuangzhuang you can close your own bug by clicking the close button ;)

@zhuangzhuang As we discussed yesterday, this is actually a bug here, could you please reopen it?

@zaaack & @zhuangzhuang how did you spot this? Is there observable behaviour?

Anyway: fix is in https://github.com/Microsoft/visualfsharp/pull/4727

@forki Not me, it's @zhuangzhuang find this, I guess he found it by accident when reading vf's source code?

mhm looks like I fixed another issue. It still does 2 reverse operations.

@kevinransom please reopen. The double reverse issue is not fixed.

Was this page helpful?
0 / 5 - 0 ratings