lefthandedgoat / genit

A cross-platform website generator and server using F#, Suave and PostgreSQL.
MIT License
66 stars 10 forks source link

Fix empty list problem with repeat #56

Closed lefthandedgoat closed 8 years ago

lefthandedgoat commented 8 years ago

let repeat (value : string) times = if times <= 0 then "" else [1..times] |> List.map (fun _ -> value) |> List.reduce (+)