Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Power-set/F-Sharp/power-set-1.fs
Normal file
1
Task/Power-set/F-Sharp/power-set-1.fs
Normal file
|
|
@ -0,0 +1 @@
|
|||
let subsets xs = List.foldBack (fun x rest -> rest @ List.map (fun ys -> x::ys) rest) xs [[]]
|
||||
4
Task/Power-set/F-Sharp/power-set-2.fs
Normal file
4
Task/Power-set/F-Sharp/power-set-2.fs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
let rec pow =
|
||||
function
|
||||
| [] -> [[]]
|
||||
| x::xs -> [for i in pow xs do yield! [i;x::i]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue