Default code update

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

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

@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 :smiley:

1 Like

wups copy paste issue :smiley:

About the space @Boulet , it was suggested by @Niako in the previous comment’ thread. I have no idea what’s best

Trust me, my version is better