Hello,
following @Niako’s comment here, we plan to update (should be released this week) the default code when reading inputs from a line in a loop.
Exemples from the Temperature puzzle:
from
let t = Scanf.sscanf line "%d" (fun t -> (t)) in
to
let t = Scanf.scanf " %d" (fun t -> (t)) in
1 Like
JBM
#2
It’s been some time since I dabbled in OCaml, but I certainly hope those HTML entities aren’t part of the actual code O:-)
2 Likes
Boulet
#3
@TwoSteps
Nice and sometime useful idea.
May I suggest to do
Scanf.scanf “%d " and not Scanf.scanf " %d” which seems more readable to me.
@JBM: no they’re not
1 Like
wups copy paste issue
About the space @Boulet , it was suggested by @Niako in the previous comment’ thread. I have no idea what’s best
Boulet
#5
Trust me, my version is better