Considering this:
open System.Linq let iota n = [0..(n-1)]
the following produces an error:
[2; 3; 4].SelectMany(fun n -> iota n)
Is there a way to pass function values to SelectMany?
SelectMany
You need to pass the result to seq<int>:
seq<int>
[2; 3; 4].SelectMany(fun n -> iota n :> int seq)
alternatively you can use List.collect:
List.collect
[2; 3; 4] |> List.collect iota
Source: https://habr.com/ru/post/1538225/More articles:AngularJS: moving nested arrays - angularjsShowing control over other controls in a grid in WPF - layoutGit настройка, возврат терминала: команда не найдена - gitRegister bootstrap event handler in angular controller - javascriptint → int list is not compatible with type int → IEnumerable <'a> - c #How to build relative frequencies in R or Stata - rHow to create temporary files. # Filename` in `/ tmp`, not in the working directory - emacsHow to create a “loading screen” for a first spa visit SPA session - angularjsIn python legend matplotlib shows the first entry of a list only - pythondust.js - render the first element of an array - jsonAll Articles