Consider the following straightforward mutable queue implementation using two stacks:
type 'a adt_queue = {
mutable head : 'a head;
mutable tail : 'a tail;
}
module C : sig | |
type t | |
val empty : t | |
val one : char -> t | |
val union : t -> t -> t | |
val inter : t -> t -> t | |
val top : t | |
val mem : char -> t -> bool | |
val make : (char -> bool) -> t | |
val equal : t -> t -> bool |
function run(input, parameters) { | |
const appNames = []; | |
const skipAppNames = []; | |
const verbose = true; | |
const scriptName = "close_notifications_applescript"; | |
const CLEAR_ALL_ACTION = "Clear All"; | |
const CLEAR_ALL_ACTION_TOP = "Clear"; |
You know the pain, you cloned a repo over HTTPS, and now Git asks you for your password each time you want to push or pull.
Chances are you already have the git credential-osxkeychain
command installed.
If not, just install Git with brew: brew install git
.
Once installed, just tell Git to use the KeyChain to store your credentials:
git config --global credential.helper osxkeychain
This gist has moved to a proper git repo so people can make pull requests: https://github.com/Zenexer/internet-reference/blob/main/Mac%20Keyboard%20Symbols.md
import static java.lang.System.*; | |
import java.util.function.BiFunction; | |
import java.util.function.Function; | |
// Implementation of a pseudo-GADT in Java, translating the examples from | |
// http://www.cs.ox.ac.uk/ralf.hinze/publications/With.pdf | |
// The technique presented below is, in fact, just an encoding of a normal Algebraic Data Type | |
// using a variation of the visitor pattern + the application of the Yoneda lemma to make it | |
// isomorphic to the targeted 'GADT'. |