[Mono-dev] PSeq.reduce does not seem to work under Mono

mono user mono.user789 at gmail.com
Wed Aug 20 01:05:11 UTC 2014


The following tiny bit of F# does not seem to work under Mono 3.6.0. It's
fine under .net. PSeq is a thin wrapper implemented using parallel Linq
(see the stacktrace). I am afraid I don't know if it's meant to work yet.

let res = Microsoft.FSharp.Collections.PSeq.reduce (+) [0..100]
printf "Result is %d" res

Any suggestions? Many thanks.

mono reduce.exe

Unhandled Exception:
System.ArgumentNullException: Argument cannot be null.
Parameter name: seedFactory
  at System.Linq.ParallelEnumerable.Aggregate[Int32,Int32,Int32]
(System.Linq.ParallelQuery`1 source, System.Func`1 seedFactory,
System.Func`3 updateAccumulatorFunc, System.Func`3 combineAccumulatorsFunc,
System.Func`2 resultSelector) [0x00000] in <filename unknown>:0
  at System.Linq.ParallelEnumerable.Aggregate[Int32]
(System.Linq.ParallelQuery`1 source, System.Func`3 func) [0x00000] in
<filename unknown>:0
  at Microsoft.FSharp.Collections.PSeqModule.reduce[Int32]
(Microsoft.FSharp.Core.FSharpFunc`2 reduction, IEnumerable`1 source)
[0x00000] in <filename unknown>:0
  at <StartupCode$reduce>.$Reduce.main@ () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Argument
cannot be null.
Parameter name: seedFactory
  at System.Linq.ParallelEnumerable.Aggregate[Int32,Int32,Int32]
(System.Linq.ParallelQuery`1 source, System.Func`1 seedFactory,
System.Func`3 updateAccumulatorFunc, System.Func`3 combineAccumulatorsFunc,
System.Func`2 resultSelector) [0x00000] in <filename unknown>:0
  at System.Linq.ParallelEnumerable.Aggregate[Int32]
(System.Linq.ParallelQuery`1 source, System.Func`3 func) [0x00000] in
<filename unknown>:0
  at Microsoft.FSharp.Collections.PSeqModule.reduce[Int32]
(Microsoft.FSharp.Core.FSharpFunc`2 reduction, IEnumerable`1 source)
[0x00000] in <filename unknown>:0
  at <StartupCode$reduce>.$Reduce.main@ () [0x00000] in <filename unknown>:0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140820/c1836a8f/attachment-0001.html>


More information about the Mono-devel-list mailing list