Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Generator-Exponential/F-Sharp/generator-exponential.fs
Normal file
11
Task/Generator-Exponential/F-Sharp/generator-exponential.fs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
let m n = Seq.unfold(fun i -> Some(bigint.Pow(i, n), i + 1I)) 0I
|
||||
|
||||
let squares = m 2
|
||||
let cubes = m 3
|
||||
|
||||
let (--) orig veto = Seq.where(fun n -> n <> (Seq.find(fun m -> m >= n) veto)) orig
|
||||
|
||||
let ``squares without cubes`` = squares -- cubes
|
||||
|
||||
Seq.take 10 (Seq.skip 20 (``squares without cubes``))
|
||||
|> Seq.toList |> printfn "%A"
|
||||
Loading…
Add table
Add a link
Reference in a new issue