It doesn't seem to be bad at all. There are always nitpicks like an unecessary .to_string() before parsing and type hint that would have been inferred, but it looks like pretty standard Rust code.
Though I do wonder, if you wanted to write a Perl solution, why not fork it in that language directly?
Just so you know, the purpose of .expect("text goes here") is to provide context if the unwrap panics. If you don't feel the need to provide context, a simple .unwrap() makes more sense.
It doesn't seem to be bad at all. There are always nitpicks like an unecessary
.to_string()
before parsing and type hint that would have been inferred, but it looks like pretty standard Rust code.Though I do wonder, if you wanted to write a Perl solution, why not fork it in that language directly?
Thanks, I'm really not very good at Rust as you can probably tell.
Just so you know, the purpose of
.expect("text goes here")
is to provide context if the unwrap panics. If you don't feel the need to provide context, a simple.unwrap()
makes more sense.def multiply(a,b):
result = a*b
return result
res = multiply (5,10)
print(res)
xd
help
i fixed it for our wonderfull cumunity
def multiply(a, b):
return a * b
Very cool.
I didn't realize lanbda functions and arrow functions are essentially the same.
multiply = (a, b) => a * b
cool
easiest kata on the website
its very easy
Decent
This was a pretty easy one