gistlib
let max_digit str = let max_value = ref '0' in String.iter (fun c -> if Char.equal c '0' then max_value := Char.max !max_value c ) str; !max_value;; 161 chars7 lines
let max_digit str = let max_value = ref '0' in String.iter (fun c -> if Char.equal c '0' then max_value := Char.max !max_value c ) str; !max_value;;
index.tsxfunction maxDigit(str) { return Math.max(...str.split('').map(Number)); } 78 chars4 lines
function maxDigit(str) { return Math.max(...str.split('').map(Number)); }
gistlibby LogSnag