If you want an Integer with a default of 10, you should instead require an Integer Option then explicitly map None to 10. Then, whoever wraps around your function can keep the Integer Option protocol and not have to propagate the magic value 10 all along the call hierarchy.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This would be fun to pair with Haskell's safe coerce
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!