Problem The following Haskell code reads a Pandoc document from the DB and then serves it to the user after […]
Tag: optional
Force-unwrapped property as a contract
Problem I have a class, which is meant to show a full screen modal controller with a set of actions […]
Conditionally display an Action depending on whether or not a player is connected
Problem Is there a nicer way to write the maybeWhen portion of displayConnectionAction ? I want to conditionally display an […]
Unwrapping optionals for max of a 2D array in swift
Problem I’m working in swift and I’ve got a custom class Array2D to handle fixed-width, two-dimensional arrays of integers. What […]
Concatenating optional strings in Scala
Problem I have two optional strings, any of them can be None. I want to create their combination with a […]
Append /src to an Optional path
Problem My method getProjectDir() will return an Optional which contains the path to the project directory, or an empty container: […]
A Start button handler
Problem I was told my code contains a lot of force unwrapping. I thought it’s okay to do that if […]
Haskell/Yesod – Butchering use of MaybeT
Problem The following is some code that is used to provide the frontend with certain parameters when rendering a form. […]
Is it worth to use if-else statement as Java optional pattern?
Problem I came to a point while refactoring using if {} else {} code with Java optionals. While optimizing code […]
Unwrapping optionals for max of a 2D array in swift
Problem I’m working in swift and I’ve got a custom class Array2D to handle fixed-width, two-dimensional arrays of integers. What […]
- 1
- 2