LeetCode 258. Add Digits in F#
URL
https://leetcode.com/problems/add-digits/
Code
https://github.com/syohex/dotnet-study/blob/master/fsharp/leetcode/problems/0258/main.fsx
let rec toDigits n acc =
if n = 0
then
acc
else
toDigits (n / 10) ((n % 10) :: ac...
syohex.hashnode.dev1 min read