politrons / FunctionalRust

MIT License
91 stars 2 forks source link

Line numbers in comment now off by 1 #1

Closed er1c closed 1 year ago

er1c commented 1 year ago

https://github.com/politrons/FunctionalRust/commit/e67cdf243fa3677b0b2083a440d30493b69e4c67#diff-01cba4a76457d04525127daffd80c30e32e152319f8908d49231becab5322ef6R59

Looks like it should be 64-65 now

politrons commented 1 year ago

Thanks! I will change that

er1c commented 1 year ago

Assuming that's true, the ? doing the return to a None still seems like magic haha

politrons commented 1 year ago

It's working like monad error, and [?] is pure sugar syntax for "if is None just return the current state of Option". That's why when you use [?] in any function, this function require from you, to return same effect system type.