Press CTRL+C or CMD+C to copy the selected text and close this dialog.
Tweet
0 people like it. Like the snippet!
One of the 99 OCaml problems rewritten in F#
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
let replicate list num = let rec replicateInner res ch num = match num with | 0 -> res | _ -> ch::replicateInner res ch (num-1) let rec replicateOuter list num = match list with | [] -> [] | h::t -> (replicateInner [] h num) @ replicateOuter t num replicateOuter list num