DEV Community

Cover image for add one

add one

o2sh on November 06, 2018

Here is a little program I wrote in Rust that allows you to add one to any number o2sh / add-one ...
Collapse
 
o2sh profile image
o2sh

It's a different approach without the limitations. Indeed, the input is not bound to a type (i32, i64...) and can be very big.

It may also be faster...

Collapse
 
vberlier profile image
Valentin Berlier

Right so your entire function would run faster than what effectively compiles to a single CPU instruction... 🤔

Collapse
 
nektro profile image
Meghan (she/her)