Optional | Either | CompletableFuture | |
---|---|---|---|
Create success value | Optional.of | Either.right | CompletableFuture.completedFuture |
Create failure value | Optional.empty | Either.left | f = new CompletableFuture(); f.completeExceptionally; return f |
Apply function to success case | .map | .map | .thenApply |
Apply a function to success case that may also fail | .flatMap | .flatMap | .thenCompose |
Handle both failure & sucess cases at once | .map().orElse() | .fold | .handle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This is the sort of thing that makes me think you'd enjoy using one | |
;; of the better Common Lisp implementations for certain kinds of | |
;; work. I'm using the latest version of SBCL here. | |
;; Ok, contrived example, but easy to imagine the code that it should | |
;; generate... | |
(defun add (x y) | |
(+ x y)) |
For Lumen (5.0.8) (Laravel Components 5.0.*)
Use Case: Deploying Lumen App to Shared Hoster such that it can be called via domain.tld/lumenapp/...
- Rename
public
to desired name (new root folder, for examplelumenapp
) - Move everything else into a new folder, named e.g.
project_src