Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Loops-Do-while/F-Sharp/loops-do-while-1.fs
Normal file
4
Task/Loops-Do-while/F-Sharp/loops-do-while-1.fs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
let rec loop n =
|
||||
printfn "%d " n
|
||||
if (n+1)%6 > 0 then loop (n+1)
|
||||
loop 0
|
||||
1
Task/Loops-Do-while/F-Sharp/loops-do-while-2.fs
Normal file
1
Task/Loops-Do-while/F-Sharp/loops-do-while-2.fs
Normal file
|
|
@ -0,0 +1 @@
|
|||
Seq.initInfinite id |> Seq.takeWhile(fun n->n=0 || n%6>0) |> Seq.iter (fun n-> printfn "%d" n)
|
||||
2
Task/Loops-Do-while/F-Sharp/loops-do-while-3.fs
Normal file
2
Task/Loops-Do-while/F-Sharp/loops-do-while-3.fs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
// Loops/Do-while. Nigel Galloway: February 14th., 2022
|
||||
Seq.unfold(fun n->match n with Some n->let n=n+1 in Some(n,if n%6=0 then None else Some(n)) |_->None)(Some 0)|>Seq.iter(printfn "%d")
|
||||
Loading…
Add table
Add a link
Reference in a new issue